So an obvious long-term solution is to
reduce the need for the grid. Many commercial and industrial facilities could run at least partly on local wind or solar, and the more decentralised capability there is, the less the vulnerability.
(I'm actually not just thinking about terrorists and suchlike. I'm also thinking about other risks, such as another Carrington event.)