To start with, rust does not "spread" from one item to another; it's not a pathogen.
Looks like the loco was submerged in water for a short while, causing some eventual damage, but not enough to totally kill it. Mere "humid environments" (I live in one) are blamed for a host of ills that they do not cause.
As recommended, clean it (carefully); use a toothbrush or the like on the boards to clean them and remove tiny metal "hairs" that can grow on old circuit boards.
The electronics (it's just a reversing unit) can be replaced easily for $40 - $50. Electric RR Co. or Dallee Electronics.