If you choose a (mech) microswitch, consider the activation force. Lower values result in higher precision, presuming a fixed location. Although I will be migrating to optical in the long run (tech snobbery or whatever), I have a trio of 8gf Omron switches set aside for the important homing locations in ,my first build. PN SS-01GL2-E (digikey p/n SW1094-ND, fwiw). They won't drive any appreciable current (100mA max), but plenty enough for digital I/O