There was no flaw in the code. The code executed the control logic that Boeing designed. Those planes did not crash because of defective code.
Apparently the question,'But what if...' wasn't asked.
Seems to me there could be a master override switch that bypasses the MCAS control but leave the servo motors online.
That way the pilots could fly the plane using the electro-servos.
The manual trim wheel is too difficult to use easily or quickly. And what of all the other control surfaces?
“Those planes did not crash because of defective code.”
Depends on the definition of ‘defective’. The code did what it was designed to do, but, as others have written in this thread, there was no anticipation in the design to deal with different situations and variables that might arise - like a faulty sensor, or disparate instrument readings.