Hey Troy...
To get back to your original question. You could use a 555 timer to control the LED headlight on your train. Basically, you would set the 555 in monostable configuration, and use input from your controller to trigger it. When you shut down the controller, a negative pulse would trigger the 555, which would then drive the headlight LED for whatever time you specify in the monostable setup (seconds, minutes, whatever). Just a suggestion.
AllVol
Edit: Ignore this suggestion. I forgot that when a 555 is triggered with a negative pulse on pin 2, the output will stay high, regardless of the rc combination, until pin two sees a positive pulse. Sorry about that.