By not drilling in the ocean, where mistakes like this have far-reaching effects, among other, more technical reasons.
Changing the batteries in the control panel that caused the blowoff mechanism (or what ever it was) to mal function.
Better testing methods for the equipment and more redundancy would also have made it a LOT less likely.
I also think drilling 5000 feet down complicates things. There is a massive lag between noticing a problem and coming up with viable solutions. It's not really a hands on issue.