In a bit of a twist, worth noting that Exxon Research & Engineering was involved in the invention of the rechargeable lithium ion battery [2]. Quoting from [3], "Thus Stanley Whittingham invented the first rechargeable LIB, patented in 1977 and assigned to Exxon."
[1] https://ir.exxonmobil.com/static-files/37b7e1b7-620b-4248-a3...
[2] https://patents.justia.com/patent/4009052
[3] https://www.currentscience.ac.in/Volumes/117/09/1416.pdf
Disclosure: I worked for ExxonMobil from 2012-2017 but don't have any remaining ties.
There are technologies that are irrelevant for cars or phone (which I do think attract most of the battery R&D) that would be a good fit for a battery the size of a building, designed to store the electricity for a whole city during the night/low wind period.
Government can fund the private R&D easily by, for instance, mandate that renewable sources installed on the grid must provide a baseline 24/24.
But public research is nothing to sneeze at. It brought us the lithium-ion battery (Goodenough was working at the U of Texas when inventing it). Private R&D is good at incremental improvements and solving deployment problems. Public research at funding radically new tech. They work well together.