The accepted standard for safety factor in product and component (including machine) design is 2:1 as a general baseline. If human safety is at risk, such as in the paintball industry, the industry standard factor of safety (minimum) is 3:1 for pressurized vessels and air guns. Those things hold 3000psi in normal use, and they don't explode until they see at least 9000psi. These things I am already aware of, and that's why I was curious about firearms safety factor because the safety margin seems close compared to other industries.
Regarding the gun that failed, it was not a $10,000 gun. It was $875 on release and just over $1000 now. It was designed specifically to be the cheapest, simplest .50 BMG possible. I have the benefit of hindsight of course, but I'm wondering if they did failure testing and if they got to see that end cap blow off straight back like that.
I'm starting to think that when it comes to firearms like a .50BMG, they are basically pushing material science to the limit already, so it simply might not be practical to have a huge safety margin. For instance, the yield of regular steel is around 30kspi. That means if you simply expose a flat section of a flat plate of steel to .50BMG pressure, it will start to deform and smash that steel plate without any stress risers or moments. It's like smashing a piece of cheese between your fingers, all you need is pressure. A typical firearm material is 4140 heat treated alloy with a yield of around 130kpsi, so even at best case using this steel, safety factor is already around 2.6 in perfect conditions. I still think the barrel should split open before an end cap comes flying off in your face.