>technically speaking, if every household had solar panels and batteries it would not only be cheaper than the grid
Absolutely not, economies of scale. To say nothing of the cost incurred when an issue appears with your installation (lightning strike, water damage, etc) would be much higher.