One hundred and thirty nine seconds is all it took for an unmanned rocket to explode after blastoff and turn Elon Musk’s booming Space Exploration Technologies Corp. into a geyser of red ink.

That June 2015 disaster, followed by months of launch delays, contributed to a quarter-billion dollar annual loss and a 6% drop in revenue, after several years of surging sales and small profits.

Internal...