There is a trade-off between the education sector and other economic sectors in the control of SARS-CoV-2 transmission. Here we integrate a dynamic model of SARS-CoV-2 transmission with a 63-sector economic model reflecting sectoral heterogeneity in transmission and economic interdependence between sectors. We identify control strategies which optimize economic production while keeping schools and universities operational and constraining infections such that emergency hospital capacity is not exceeded. The model estimates an economic gain of between £163bn and £205bn for the United Kingdom compared to a blanket lockdown of non-essential activity over six months, depending on hospital capacity. Sectors identified as potential priorities for closure are contact-intensive and/or less economically productive.