2x12 is overkill honestly.I'll mount a 2x12 at the center location and then anchor it with numerous Tapcons into the concrete wall core.
The 12" wide wood surface area will provide a good load distribution point and the 3/8" Tapcons will provide excellent holding force
2x6 or 8 is perfect
I’ve seen 2x4……some hold up some don’t.
Is the foam stiff?
The torque of the springs isn’t static. Door open=minimal load/door closed=max. If the foam is “stiff” it may be fine. I’m not well versed in mounting thru foam.