Yeah, the square tubing is a box beam; filling it with anything at all won't add any bending strength. The web plates of the beam are created by the sides of the tubing; these, along with the flexural strength of the top & bottom plates, determine bending strength.
Nor will the foam have any insulating properties at all in this application, as there's no thermal break created by the foam. Of course, it's great when used in a sandwich construction.
If the OP's primary purpose is to eliminate condensation inside the tubing, it's certainly going to do that (but not because of its insulating properties). It's simply excluding air from the inner surface of the steel.