Spray foam is a very specialized packing material, often required for use in shipping valuable fragile items. Engineered packaging principles are designed to protect sculptures, vases, large fossils, lamp bases, busts, computers, furniture, chandeliers and other objects of unusual shape. By virtue of the liquid foam expanding by up to 30-60 times the volume of its liquid state, it efficiently protects almost any size, form and weight.
My other question was gonna be this. We ripped all the drywall out after Hurricane Harvey and we found some latent termite damage from some time back. One of the common studs in one corner is pretty well eaten to shreds. I was gonna brace it but then I read about more modern framing practices and I read how each stud is a thermal bridge. So now I'm thinking that I won't bother with it because the house hasn't fallen down and the foam might help a little. Unless you say to brace the stud. Then I'll do it, Martin! :)