At the beginning of this month, as a thermal dome pushed temperatures in parts of the Middle East past 122 degrees, Iran ordered a two-day shutdown of schools, banks and public institutions, which helped relieve the burden on the nation’s faltering power grid.