My coach has about two inches of the spray foam all over. Fact I even thought they had gone wild spraying that stuff because when I had to change out a light bulb in the rear taillight, I had to dig through all that darn stuff. It is not easy to take it off. They sprayed the firewall in the front behind the generator, all underneath the coach.
It does insulate the coach pretty well. When I go deer hunting in Utah or Colorado whether gets around 10 degrees and it stays warm inside.
So yes to insulate the front firewall, use the spray foam. We used to use it in the railroad to insulate the walls of refrigeration cars and wine loading box cars.