If I am seeing the mold mark correctly in your picture, your S40 was manufactured in mid-February 2001. I have an S9 manufactured in 2000 and an M9 manufactured in 2002, but neither frame looks like yours. On my Steyrs the polymer frame in front of the steel slide rails/trigger assembly is a well squared-off, substantial structure. It appears that the designer beefed up the structure to contain the back and forth motion of recoil and return to battery.
Your damage looks like the deforming force is coming from the rear, caused by forward movement of the rails/trigger assembly in the frame, and a crushing effect on the rear of the polymer support. The movement and force then broke out part of the polymer frame and splayed out the vertical supports. Without disassembling the trigger assembly, the supports appear to be continuous with the trigger guard, so they act to strengthen frame walls, as well.
If things are as they appear, the next phase of destruction probably would have sheared off the remaining polymer support, likely causing a catastrophic destruction of the pistol with pieces flying in all directions. I think you lucked out.