The 'cogwheel' is the sector gear as only a 'sector' of it has teeth (the other gears are the pinion gear on the motor, the bevel gear touching the pinion gear and the spur gear in the middle of the bevel and sector. This is a little confusing as the whole set is a 'spur gear set' rather than a 'helical gear set' this gets nice and confusing when using helical gears and the same middle gear is still called a spur gear)
Spring pushes it forwards as mentioned, speed at which it travels backward has no effect. a larger spring (M120 instead of M100, for example) simply pushes it forwards faster. You can use this effect in 'short stroking' by removing teeth from the sector gear so the piston is only pulled back, say, 12 teeth, not the usual 16, using a larger spring to push the smaller volume of air faster.
If everything is 'damn fast' then the sector gear CAN engage into the piston rack before it's fully forwards. This is baaaad. This pre-engagement can damage both piston and sector gear to the point of breaking teeth off both.
The function to stop this from happening is simple: Don't use 11.1 LiPos in stuff not designed for it.
The tappet plate engaging early can be measured:
Chrono on semi auto
Chrono on full auto
If there is early engagement on the tappet, the auto chrono test will be lower, typically a 10-40fps loss and inconsistent results.