I've been thinking about this for a few years and have come to the conclusion that we will continue making the same mistakes until we can create a set of rules that everyone can follow. If you look at what civil engineers have done you will see that they have reduced much of what they do to equations and repeatable patterns (for lack of a better term). When someone sets out to build a bridge or a building, they start by designing it with an architect and then they pull out the equations and key tables to ensure that they have the load, weight, use, wind and all the other elements take into account. This is coupled with a very strong set of building codes that dictate minimum strengths, materials and designs to ensure safety. Setting aside the occasional corner cut in construction or neglect, when was the last time a building or bridge just collapsed? (Ok, we know the bridge in Minneapolis, but that wasn't design it was neglect)
It's this level of discipline and rigor that ensures what engineers and architects design and build will work as planned. Couple this rigor with government and professional group mandated licensing of practitioners (try getting a building built without a professional engineer stamp on the design certifying the design is sound) and you can ensure that those designing and building something has a minimum level of training and understanding of the basic physics and processes to ensure sound design.
Until software development can create those same sets of rules and patterns, we will be doomed to repeating the same errors over and over. What we're doing right now is the equivalent of showing someone geometry, basic physics and some sense of writing and then expecting them to design and build the Empire State Building, Burj Khalifa or an Airbus A380. If our physical counterparts did the same, then no one would even think of flying or sleeping in anything other than a tarp strung from trees.