Apparently to many coats of epoxy doesn't allow the spray foam to stick to the metal, rather it adheres to the paint instead.
I’ve read that also. My 40 year old steely was spray foamed and it held up great.
However these days, I’ve never spoken to a commercial shipyard which uses anything other than rock wool.
You may consider a thin layer of spray foam to eliminate condensation and then a thick 3” layer of rock wool for additional insulation.