Optical switches are the most accurate, all other things considered. However, you really don't need great accuracy on the Z axis, a mechanical switch there is just fine. A lathe needs high homing accuracy on the X axis because you keep all the tools set, or at least the main ones anyway, roughing, finishing, parting off. So, you need to have good accuracy on the X axis so that these tools will always be set to maintain your diameters, different stock materials will slightly alter your finish diameters though. The Z axis, on the other hand, you usually set the Z zero point off the end of the stock with each new job, so the Z axis does not need to be as accurate.
DaveA.