Analog circuit for a Useless Box.
https://www.youtube.com/watch?v=aqAUmgE3WyM
Employs a single SPDT toggle switch and a couple of NPN bipolar transistors to reverse the polarity to the motor to change the direction of rotation.
A limit switch is included to stop the motor once the arm has retracted inside the box completely.
Also added a LED that will illuminated while the motor is running in either direction and is coupled with a capacitor to smooth out any voltage irregularities caused by the motor.
Not sure why the simulation doesn't show the motor spinning when it appears that the electron flow is correct.