Maybe, but 1/4 inch of foam around a solid steel bar isnt going to do much in a collision. Plus the rollcage will impede the functioning of the side airbags the car is equipped with. Plus it will impede extraction from the car if such a thing may happen.
I agree in some scenarios it may be safer. But in many others it may not.