For motor, if parts are to move, what they should be lubricated with is defined in your user manuals. If anything, I see people spraying “too many things with too much crap” and then the block becomes all sticky and it attracks dirt and everything else.
Once I know anything that is supposed to move is properly lubricated or greased, I may apply a dry silicone to the powerhead for purposes you are talking about, but I would clean the powerhead first, even using damp rag or paper towels. I advise that you do NOT spray any plug wire electrical wire with any product, as some of those products contain things that cause the rubber or plastics to degrade.
Someone once sprayed the entire block with Boe-Shield T9 Which is a highly rated protectant, the only thing is it gummed up things that were “supposed to move”, like the shift disconnect switch in V6 OMC motors. Personally I go for clean ... and make sure anything that is supposed to move is properly lubed or greased by the specific product and only applied at the point of use.
For the boat, the cheap WD40 would probably work. I did read a torture test where they tested 46 different corrosion/lubrication protectants and the WD40 ‘Specialist’ brand long-term corrosion inhibitor was ranked #1 in the results. But that is $10 a can at discount places.