It’s up to the boat manufactures, but Maxum installed two independent oil pressure sensors for diesel engine models, and that’s a good thing (but sometimes confusing when one fails). The original Cummins has one sensor and it shares with the alarm and gauge.
I can’t really see well on the picture, but if the one on the right “oil sending unit?” has only one wire, that would be the pressure sensor for the alarm. Also, by looking at closely, the paint on the wire is scraped off by possibly the fuel line in the middle. If the engine vibration was causing fuel line to chafe the wire, and the contact became loose, you could get the false alarm.
__________________
|