Not only is the power grid computationally diverse, a lot of it is very old and hence has a small attack surface due to having little to no features. (Particularly so in the case of things like nuclear power plants, which are the best terror targets because people are already irrationally afraid of them. Both designers, builders, and operators are loath to update systems in nuclear plants because you already have systems in place in them that are well-tested and regulatory approved, putting in anything new means getting it tested and approved to the same degree.)
Batteries as storage for the grid are even worse than the obvious losses of the battery itself (both the loss at conversion between electrical and chemical energy and what leaks out while being stored). The grid is AC, and batteries are DC. You end up wasting a lot of energy converting between the two. (And wind turbines have relatively poor conversion efficiency of the electricity they do produce. Because wind speed is variable, the frequency and voltage produced also vary. This means you have to use what is basically a huge switchmode power supply and DC-to-AC converter to convert it to grid voltage and frequency. Switchmode power supplies are only highly efficient in a narrow range of input voltages and frequencies, and DC-to-AC converters that don't make horrible waveforms are both inefficient and very expensive, especially if you want something that can convert megawatts. The fact this stuff all needs to be very big and very reliable and thre aren't going to be that many of them means each device will cost a lot.)
If you want solar power, we need to put it in space and beam the power down. Except you might not need to beam it down, since the best way to ship large quantities of stuff up and/or down appears to be these wonderful things called launch loops and orbital rings, which can rise out of the atmosphere under electrical power. (These also make vac trains practical, since they get free vacuum without engineering problems, and you actually kind of need them to get around the network.) The same technology allows construction of solid rings at rest relative to the surface at orbital altitudes. A suitable network of such things allows a rigid structure from geosyc all the way to the surface that can carry lots of power. Even if making elliptical orbital rings with a worthwhile variation in max and min heights is infeasible, you can still step between rings by tethers, which can certainly carry power as well. We can probably build these now, without any new materials like long-strand carbon nanotubes.