You don't have to plug it in. Was steam driven.
You fire it up.
In all seriousness, I saw the show and still think it was either a music box or a device for animating some sort of statue or display, whether the mainspring rotted away or it was steam powered is no matter.
That being said, on anything short of a modern CNC machine the manufacturing of gears is still quite touchy. At least with the CNC, you can make scrap faster!
Go to the AGMA. That's the American Gear Manufacturing Association.