Here is how to implement a stepper motor to sense position and actively correct any error that might accrue during actuation.
Stepper motor linear actuators (SMLAs) combine a stepper motor, precision lead screw and nut in one compact envelope, providing a highly configurable, customizable and robust system for linear motion.