The assembling is like this... encoder on the back motor shaft and a gear in the from shaft... as the "linkage" is made with a gear, there is no slip and no error.
No, I cannot add physic switches as I have told before, as this has to be as small as possible.
I can tell that I am trying to build a remote control to my photo DSLR camera which as a dented gear in the rings (in all my lens which has different ring rotation ranges)
The motors (one per lens function, focus and zoom) are mounted in some rods attached to the camera, and the motor gears put together with the lens rings gears... as you can realize, I have 0 (zero) encoder slip. If the motor reaches the lens ring max or min, it will certainly stop on that exact point.
Here you have an example of a similar device (motor to lens attachment) used in Cinema camera lenses.