[OPEN-SOURCE] Machinery Modelling Toolkit

There is no template in MMT for this. The simplest would be to make a small AI that changes gears of mechanical gearbox at the right time.