If the self level suspension control module had corroded pins it had to get a little wet somehow. The black plastic bin the battery and module are in has a foam seal around the perimeter where it bolts down to the body that gets flattened out after so many years and can let water in if you're driving through a decent rain, especially on the highway. You can probably just unbolt in, prop it up an inch and run a small bead of rtv under the lip to seal it when you bolt it back down. (if this is the case at least)
And the module won't work properly plug and play, would have to be coded and activated/calibrated etc. by either the dealer or a properly equipped indy that knows how to do it.
For the license plate lights, the seal around the grip strip can leak after the years as well and cause corrosion/resistance at the lights. You can see it not so clearly marked in this link.
RealOEM.com * BMW E53 X5 4.4i TRUNK LID/REAR WINDOW