But now we have storage, distributed production, power meters, etc.
It's relatively easy to set up a grid in which several houses produce, storage and exchange energy with a simplified free market pricing system.
Alas, in most countries it's illegal because you aren't allowed to set up such a network. Energy is one of the big control levers the State has over people.
Again this was done in the 19th century. It is horribly inefficient. The only reason why it seems like a good idea today is because power companies are now rentieers instead of service provides.