Precise and Rack & Pinion don't really go together, certainly not in your typical home built machine.
Regardless, the OPs idea would be best acheived with a microcontroller, however it would also need stepper drivers that are capable of having the motor current varied on the go, which I think would be the biggest stumbling block.
Any delay in changing current levels could result in a jolt as backlash changes direction (motors would go from pulling apart to pushing together, or vice versa), which could lead to missing steps/jumping issues.
Just spring loading the pinion onto the rack, or using a anti-backlash pinion are far simpler solutions.