Dumbing down the advice here a bit, . . . a few months ago someone posted a review of No-Ox-ID , a special electrical contact grease, and said that after putting an even coat of it on all of the center rails, almost all of the light flickering in his car lights stopped.
I bought some online, and tried it. It practically eliminated all flickering, except when a car passes over a turnout, or over a crossroad, where the gaps are big. It was a great solution for me. And, in a weird way, it looks kinda realistic to have the lights flicker when the cars clatter over the turnouts and crossroads
You might want to try that.