I don't know what kind of motor Humpty Dumpty has but many games use an induction motor where the rotor that spins inside it slides in and out of the laminated steel plates. When power is applied the magnetic field created around the rotor not only causes it to spin but it pulls it more into the laminated plates so that the gear at the end of its shaft engages with the rest of the gear train. When power is cut, the rotor should slide back out of the motor and the gear should disengage from the gear train immediately. This allows the motor gears and cams to stop suddenly while allowing the rotor to spin down gradually. It's essentially a simple clutch.
If you have that kind of motor and the rotor doesn't slide easily in and out of the laminated steel plates the rotor could keep the gear train and cams turning after power is cut until the cam eventually closes the runout switch which sends power to the motor again. A sluggish rotor could be due to hardened lube or a worn spring (if your rotor is mounted horizontally).
/Mark