I had a functional e-unit running with an Arduino-type board, 2 relay module, and a super-cap a while back just to see if it could be done. less than $10 in parts, but it was a bit overkill for an e-unit. Also took up a lot of space, so probably need to stuff the electronics in the tender to actually use it.
The idea really became more worth while, however when a 99 cent radio was added as well as a tirac to apply PWM to the motor. From there we can implement something like LionChief functionality, which is pretty neat on a post-war engine.
JGL