If you paint the rails, you need to clean off the top and insides of the railhead to allow for conductivity. If you paint / weather the truck sideframes that wouldn't affect the electrical connections, but if you paint the wheels you'd want to be sure the tread - the part that touches the rail - is clean.
You can use Neo-Lube from Micro-Mark's catalogue which is an electronics lubricant that dries to a flat dull gray. Even though it does conduct electricity, you'd still want to clean it off the tops of the rails etc. since real track looks that way.
If I were to paint my tracks, and on trucks on the loco, would this disrupt the electrical connection between the two?