Adding capacitor to model railway 12V motor to keep it going over a dead spot
This is easy for digitally controlled railroads, where you can connect the capacitors to the DC part of the circuit behind the rectifier.

I've done it for LGB garden railroads with nominal 24V (in reality up to 28V), using ten or eleven 3 Farad supercaps in series, which gives about 0.3F = 300mF.  The supercaps need to have low internal resistance.

With that the train can continue to run for about a meter, which IMHO is a bit much (but there are no suitable smaller capacitors, so I can't easily change it).  If control is lost near the end of the track this can result in a crash.

A more detailed description of the circuit:
The circuit uses a diode and a resistor to limit current when charging, but not when discharging.  There is also a choke in series with the capacitor, so that the fast digital data signals are not filtered out.  Resistors across each capacitor even out the voltage and discharge it slowly when not in use.