You do not give enough specifics about your machine for anyone to make specific suggestions. The trouble you mention can be related to mechanical binding of backlash, electrical issues related to drive electronics and motors, cross coupling of signals due to the wiring type or layout, incorrect settings in Mach3, and/or the computer itself. Getting a new machine running with complete reliability can sometimes be a real challenge.
The first thing I would suggest trying is to reassign the problem axis to a working axis and see if the errors follow the reassigned axis or stay with the original problem axis. This will confirm that the problem is related to just the Z axis assembly - or not. Start with swapping the motor wiring at the motor driver output terminals and interchange the Z axis motor wires with whatever you named the gantry axis. Make one change at a time and record the results as 'errors' or 'no errors' in a simple chart format.
Is your motor wing shielded cables or individual wires? Are the cables/wires tightly bundled together? Are all motors the same, or is the Z axis motor rated at lower torque? What is the voltage feeding your driver(s)? Is it a Gecko G540 or a Chinese driver? There can be a hundred other questions to come if the solution isn't obvious in a short time.
I had a Mach3 setting problem on my first build that that used slaving of two motors and it drove me nuts for three months. In my case it was causing racking of the gantry.
CarveOne
http://www.carveonecncwoodcraft.com