They're have been a couple of methods put forward.

Unfortunately with no actual information on the controller boards only a generic answer can be given. The actual way to implement a specific method is up to the person/persons that have the hardware sitting in front of them. That's usually the situation with these issues. A question is asked without a lot of information regarding the hardware involved so only a generic answer can be given.

Maybe the best answer would be to ask the person/persons that designed your setup, or try and think of a way of not having to change the stepper driver or inputs.

The best option would for the main control software\hardware to operate\adjust the Z axis and be able to read the output from the system that adjusts your focal length. Of course this would depend on the main control software\hardware.