Still would like to find a foam product to fill the void and keep the water out.
Keeping water out works if it was designed to do that. After the fact, over inconsistent surfaces, is likely to leave some tiny void for water to get in. Once it's in, it will never, never, never dry out. And you will never see it. Grease works well for filling a small void, and if you put a zerk fitting on it you can pump new grease in and pump the old stuff out.
I'm doing a little( I jest , it's gobbling up time frantically) preventative maintenance on my '64 panelvan......The last time I drove it was to the salt in March '06.....I spent a day washing it down when I got back...then parked it for eighteen months on the dirt
....It hasn't had a full resto in the fifteen years I've had it and hasn't really had a proper underbody coat on it for a while either.......Now it's on a rotisserie and I've cleaned it up , blasted it where it was that familiar reddish color and am getting ready to paint it with , whaddayaknow??? PPG epoxy primer.....I'm doing this because I want to keep the car , but not use it for a while....any way the point of this story( yes there is one) is to tell you about the factory installed system that kept most of the floor pristine for 43 years.........It's been leaking like the bloody Exxon Valdez since the day it was built , yes it's as simple as tipping oil in the top of the motor and then various forces generated by it help to distribute the oil evenly all over the underbody where it acts as a moisture repellent. I'm now nervous about the fact that having washed it out of every nook and crevice that I have to get the PPG to get full coverage or I've actually made the situation worse....this could be a lesson not to mess with natural systems.
Interestingly the soil in the area of lake Gairdner is bright red ..they mine iron ore in the area....everything looked worse under the car because it was coated in a layer of this red iron oxide .......so I was relieved that a lot of it was pigment rather than trauma.....
A simple understanding of the chemistry of oxidation will help you understand what will lesson your rust problems , keeping water away from bare metal is one of the keys , metal mixing is the other.