The showdown over the Strait of Hormuz risked reigniting hostilities and deepening the regional war’s economic fallout.