I gave this some thought. I found a diagram for a whistle car to get a look at the truck connection hardware. It reminded me of Pre-War O lighted cars.
One way to help that arrangement is to spray the post and washer hardware with CRC 2-26. It's a cleaner, lubricant, and contact improvement spray. Put a cloth or paper towel opposite the spray tube. That will improve that connection for the feeds.
The bulbs don't care if they are lit by AC or DC, so following the thought of the bridge rectifier and capacitor, I put together a circuit. I borrowed from LED driver circuits presented by Dale H and my own experience.
The circuit takes the two wires from the trucks and runs one through a polyfuse, polyswitch, or PTC. This is a self resetting fuse to protect the circuit from shorts(derailments and such) Then the AC is converted to DC through a bridge rectifier. A capacitor is connected across the + & - DC output for flicker reduction. This increases the voltage, so a resistor is added. Then the DC + is connected to the center pole of the lamp socket and the DC - to the lamp socket base.
Not knowing the voltage that you run at, I assumed 7volts and used a 400ohm, 1/4w resistor to keep from burning out the lamp. If it is too bright, just increase the resistor value.
The package when soldered together is very small. Some electrical tape around it to prevent shorts and a dab of hot glue to hold it place should work.
The schematic is attached. The links to Dale H.'s led circuit is below. I sourced all of the parts from Digi-Key, which has the cheapest shipping. Links below. I have also attached the Visio file, if you have it.
if you want to put in led strips, I have an alternative driver by grj.
I hope that helps.
Dale H. led
PTC .39 Optional 1/2A PTC
Bridge Rectifier 1.32
Capacitor 1.28
Resistor .10
3.09
I'll crawl back in my 3 rail hole again and listen to the voices.