Poverty and misery in the world are mainly caused by this kind of mechanism.
On the other hand if prices are high, and someone has sells electricity that was bought when prices were close to zero, then the cold people will get warm for cheaper than if there wasn't a battery.
Sorry, but you really make no sense.
What makes this application of this social regime so different from e.g. food or medicine?
In case of some failure of the system you're proposing, the prices would skyrocket, the poor would not get power at all, and the rich would have power all the time but for a very high price. Economically speaking, that's great for investors in batteries and supporting systems, socially speaking, it's a horible world to live in. And the system is very unstable already, in portugal it already failed horribly not long ago.
i.e. if we want to avoid food shortages, we need to overproduce the raw goods and therefore waste some. Transporting and transforming those raw goods into food that someone can eat still costs money, it's not just so farmers can get paid. We probably should still actually make sure no-one goes hungry, but that does actually involve some cost and effort on the part of the government, and the challenge there is mainly political elements who don't like the idea of someone getting something for free.