The way I read it, it wasn't the square windows of the Comet with was responsible for the failures, but rather structural failures in the metals.

What my old landlord* would have called low cycle fatigue.
*For several decades my landlord ran the office of a major aerospace company which did
failure testing on materials and components. He broke things, and then wrote reports on why they broke, so that other people could design things that didn't break so easy.
The square windows were most definitely a source of failure, but not the only one. The corners in a square window cause stress concentrations and when the plane was repeatedly pressurized and depressurized, the frame was essentially flexing each time. The corners of the windows were one of the major spots where cracks formed and propogated, though not the only one. The subsequent recall and redesign of the Comet I led to the Comet II-IV which had oval windows to alleviate the problem.
To be completely fair, De Havilland did thoroughly test their airframes, however, the testing methods and techniques of the time were not stringent or precise enough to uncover the problems that arose from high-altitude jet flight. After the recall, De Havilland published the results of everything they learned which meant that Boeing and other competitors essentially got to learn from De Havilland's mistake and overtake them in market share. De Havilland paid a heavy price for being first-to-market but did the right thing and shared what they learned so others wouldn't make the same mistakes.
Today, the modern aviation industry is extremely regulated, both by self-regulation and by the government. There is a joke that goes along the lines of
'What do jet airliners run on?'
'Gasoline?'
'Nope, paperwork'
And the joke is pretty accurate. There is paperwork for every single operation that goes into making an airliner to make sure proper procedure is followed correctly. This joke is illustrated by the recent FAA fines on Southwest Airlines. SA had to do a bunch of repair work on their fleet and though they did the repairs correctly, they did not fill out the correct paperwork for the job(s) and were subsequently fined. If you think this is 'out of control' regulation, consider how many people could die on the average aircraft if such procedures are not followed and the subsequent devastation to the airline industry.
Such regulation is entirely warranted.
Going back to stress cracks and fatigue - these days certain parts of airliners are called 'fracture critical' which means the part has to be specially treated to ensure stress/fatigue cracks do not form and propagate because if these parts fail, the airliner crashes. One way to mitigate such fatigue and stress problems is to treat the surface of a part.
When a part is machined, the machining process itself places the surface of the part in tension, which means that any tiny little crack that forms naturally tends to pull itself apart due to the tension forces. Manufacturers send these fracture critical parts to a shot peening machine that shoots the part with millions of sand grain-sized pieces of metal. This beats up the surface and relieves that tension so that when cracks form, they don't spread.
One great example of fatigue cracks (beside the Comet I) is the Tupolev 144, the Soviet's answer to the Concorde. Soviet industry and technology were not capable of creating such an airliner but they were hell bent of having one because the West had one. This rush led them to use 'novel' construction techniques such as making parts of the fuselage out of giant slabs of machined metal. This saved weight, but it also meant that once cracks formed, they spread down the entire length of the fuselage instead of coming to a joint and stopping. For this and numerous other reasons, the Tu-144 had a very brief passenger life and was essentially an enormous money-suck for the USSR.
Oh look, another one.
Sepahan Airlines Flight 5915
Easily explainable by the state of Iran's airlines, which rely on Soviet-era planes due to Western sanctions.
Yeah, they fly really old aircraft and have a hodge-podge of parts to keep it all together. It's not a good situation for them at all.