The moment I saw an "electric engine" - a model engine where solenoids replace the pistons - I just had to build one.
It's cobbled together from scrap as you can see. For the slightly fiddly bit of adjusting the timing of the "valve" switch, I mounted it on some perforated offcut which is easier to bend into place. As for the flywheel, all I could find was the broken stator from a stepper motor that happened to be in my solenoid box.
The electromagnet is rated for 24v, but in the video I'm using just 12v and I think with some fine tuning you could get it to run even slower.
A thoroughly good way to spend an afternoon I think.