Part of a safety critical electrical control system. It detects the position of a motor operated device. Here is a cropped photo showing the worst section of the unit that has suffered from corrosion (and hence possible interment erratic operation). I didn't take a photo of the new unit. But it was shiny and glinted in the light, even more so with the rain drops on it...

I can't tell you too much more or the company that pays my wages may get upset. They can get a bit touchy, as the machine is located in areas where the public are also present.