The Immobilizer (what you called the Control Unit) is not swappable without programming. But since it still works, you can take it out, open the box and douse it with rubbing alcohol to displace the water, then allow the alcohol to dry completely. You can even use a toothbrush gently to remove any corrosion you see. If you plan on doing that, do is ASAP before more damage occurs.
The headlight problem you are having is not related to the Immobilizer. looks like the headlight switch is your problem, but you'll have to do a little research to be sure.
Search keywords like "drain tubes" "immobilizer" in General Discussions and most likely you'll find answers to all your questions.
If you can't find what you need, post your questions here so you'll have better luck with a reply:
Boxster General Discussions - 986 Forum - for Porsche Boxster & Cayman Owners
Welcome and good luck!