> Particularly in heating, where peak demand is in times with very little solar generation, it seems like this will be challenging.
Heating is actually likely to be one of the easier questions here, because heat is just fundamentally an easier problem to tackle than most other intensive uses of energy in the modern world.
1. Solar isn't the only incredibly cheap form of intermittant renwewable energy production. Wind is also great, tends to support local manufacturing economies more than solar, and is anti-correlated with peak-sunshine. The wind tends to blow hardest in the winter and around sunset.
2. Heatpumps can pretty comfortably achieve 300+% coefficients of performance, meaning that for every joule of energy you put into a heatpump, you'll get 3+ joules of heat pumped into your home, office, or city-scale heat thermos
3. Heat energy storage is cheap compared to batteries. You just store large quantities of water or sand and heat it up with a resistor or a heat pump. The scaling of surface area versus volume ensures that the bigger you make the heat-battery, the less energy you'll lose from it over time (percentage wise).
4. Heat is a waste product from many other forms of energy usage, and can be harnessed. For instance, gas peaker plants aren't going away any time soon, and cities which aren't harnessing the waste heat from those peaker plants and using it in a district heating system are wasting both money and carbon.
Just a couple kilometers from my home for instance is a gas power plant that stores waste heat in giant thermoses, and pumps hot water to my building to to be used for heating. They currently have the largest heat pump in europe under construction on the same site intended to supplement the gas plant, both to take up slack from the fact that it'll be running less often, and to expand the service to yet more households.