They failed because they tried to 'refactor' nature. Stalin’s 'Great Plan for the Transformation of Nature' and Mao’s 'Great Leap Forward' (which applied industrial throughput logic to biology/close-planting) are the ultimate warnings of what happens when you treat complex, probabilistic systems (ecology and humanity) like a closed-loop machine.
Mao wasn’t an engineer by degree, but he was a High Modernist by practice. He believed society could be 'debugged' and 'optimized' through central planning. The result wasn't a more efficient system; it was a total system crash that cost tens of millions of lives.
Current China is a perfect example of 'Success by Engineering'—high-speed rail and ghost cities built on a demographic 'memory leak' (the One Child Policy) that is now crashing the entire stack. This is exactly my point: Engineers optimize for the metric they can see, while ignoring the high-dimensional chaos that actually sustains life.