Planetary gearboxes for railway maintenance