1. It’s not your resource to allocate.
2. The grid mostly doesn’t care how far the battery is from the panel.
3. Lithium ion is an incredibly inefficient means of storing power that doesn’t have to be portable. Grid storage doesn’t use Li ion because it isn’t cost effective.
In summary the major misallocation of resources is using lithium batteries to store grid power at all. At home solar is the next Great Leap Forward for humanity. It's about as logical as making steel at home.
In case you didn't get the reference: https://en.wikipedia.org/wiki/Great_Leap_Forward