Saw this on a boat for sale. It is on the raw water line, exiting the transmission cooler (just visible with the salt encrustation at the right). Does it contain a zinc anode perhaps?
Further information: It has 3 wires all connected to the same stud (i.e. connected together). All 3 wires terminate on ground connections around the engine block.
I can now only imagine that the device contains a zinc anode. Device housing is plastic.