I've been through all this on a commercial boat, and classic bikes as well. Getting the custom car thing out of the way, those which are internally coated are to stop heat discolouration of the header. Also popular on air-cooled bikes. And it does work, the heat doesn't transfer to the outer service. I actually tried the poor mans' version, coated the inside of the Norton headers with UHT exhaust paint. It worked, after a fashion.
As for wet exhausts, the point where the hot exhaust gases and the cold seawater mix is where you get the corrosion, and this is unavoidable. I took over a boat (6V92T GM) with stainless fabricated exhaust, light gauge, single outlet model, failed in the first year. Replaced with cast iron bends and heavy steel tube, lasted for 5 years and was still going when engine replacemnt gave me the twin-turbo model, needing two outlets. The exhaust was fabricated from cast stainless bends and heavy tube, and was till going over 10, 000 hours later when I changed boats.
The shape of the exhaust was mentioned above. I have something to add on this, from bitter experience. S-shaped risers are OK, sort of, as long as you have the headroom to get a really big rise, and a lot of boats don't. Thge best arrangement is to have an end stop, with the exhaust coming in overhead and downstream. Your major risk is having seawater rush into the riser when shut down, due to boat roll and pitch. And it won't dribble, it will fill the pistons which have their exhaust valves open. Can cost you a motor if you try to start it and hydrauliclly lock up, bending one or more rods. With a stop end, any water shooting up the exhaust should just hit the end stop, then run back out. I have included a rough illustration below.