I am a hobbyist with my first CNC machine (a Probotix V90 mill.) I looked at using a webcam instead of limit switches, since the webcam would be cheaper and easier. Note that on this class of machine. exceeding the limits is merely embarrassing, not damaging.
(except for -Z, but that's another problem altogether.)
For this use, I would place the camera in a fixed position on the enclosure, behind the gantry, and use it to locate a square painted on the back of a piece of metal mounted to the Z axis. Accuracy need not be better than 0.1" and I suspect that just about any machine vision system, with just about any camera, could handle this single, trivial, completely reproducable problem.
Cost: limit switches are "only" about $2.00 apiece: you need 5 of them, plus you need to run the wires, plus you burn I/O pins. A cheap webcam costs about $20 except that I have several in my junk box, and you need only one fixed USB wire, not 5 moving wires.
A Webcam that can get you within .1" can be used in conjunction with a touchplate. Use the webcam to get close using rapids, then touch off for final accuracy.
I have not pursued this, since I have lots of other machine improvement projects in play. (I added the limit switches, but I would still prefer to use the camera.)