I was taught not to paint tires, side rods, main rods, valve gear parts, or couplers on any operational locomotive because it hides cracks and makes cracks more difficult to see when they occur.
Before the common use of "dye penetrant" crack finder we used to "white wash" parts to look for cracks. To do so the part was cleaned, coated with mineral spirits, wiped down to remove the mineral spirits, then coated with a white wash of lime mixed with alcohol. When the alcohol evaporated the parts were tapped with a hammer. Mineral spirits retained in the crack will migrate into the "white wash" and show the presence of an otherwise invisible crack.
Sometimes the locomotive would get re-assembled without removing all the white wash.
Display (park or museum locomotives) frequently get painted rods and tires to stop or hide rust.
John Bush