Does the Walthers light bar have incandescent bulbs or LEDs?
If it's incandescent bulbs, you'll have to use a non-polarized electrolytic capacitor.
If it has LEDs, there will be a diode bridge circuit on it so you'll need to determine which LED input is the positive and which is the negative side, and use a polarized cap.
Either way, a capacitor of sufficient storage capacity is going to be rather large and visually obtrusive. The cap should also be rated for at least 25 Volts.
Are you running DC or DCC? A capacitor used for energy storage and "smoothing" is essentially a DC device. So, you need to make sure that you put it in the circuit where DC is present. The input would be the wrong place to put it if you're running DCC.
If there is a bridge rectifier (or a set of 4 diodes - same circuit) on the light bar, then the capacitor should be placed after that.
It takes an iron man to play with a toy iron horse.
I'm thinking about installing a capacitor into a DCC Walthers light bar. What will be a good way to wire this?