As someone who recently self-installed home batteries (LiFePo), I learned quite a bit about what drives up prices. It's not regulation. If anything state incentives in California can drive down the prices (if you qualify for them), and federal incentives drop the price by 30%, thanks to the Inflation Reduction Act.
In my experience, the big cost with home batteries are the same things that make artisinal custom designed and built homes expensive: the labor cost of the complex system design, installation and integration, and the premium charged because they are still marketed as a luxury product, not as a basic home appliance.
Why the complexity? It should be easy to install batteries on a house, right? In reality, every house has an idiosyncratic set of challenges and decisions that need to be made when integrating battery storage: What loads do you want to back up, and for how long? Where will the backup sub-panel be installed, and how can the backup circuits be routed to it? Where is a safe location for the battery and the automatic transfer switch to be installed? They are all answerable, but there is no general solution and each one is on a case-by-case basis.
And yes, this all does have to meet electrical codes (which exist for a reason), and needs sign-off by local building authorities, but they are not the main cost obstacle any more than they are for any major electrical upgrade to a house.
Take away the "luxury premium" part, and this also explains why home rooftop solar will always be much more expensive on a per-watt basis than utility scale solar (and yes, utility scale solar doesn't include the cost of transmission, as with any grid scale generation source).
Compare that to an EV, where thousands are assembled with predefined requirements, a known set of inputs, all in a purpose built environment (a factory).
And even better, they come with a standard plug interface that we can use to send power back to the house or the grid! But hold on: if you want power when the grid goes down, you're going to need an islanding transfer switch and perhaps decide which loads to back up. I mean, do you really want to run your 40A jacuzzi heater or your 50A air conditioner off you car battery?
In an ideal future, every house would be built with a standard connector (analogous to USB for phones or EV charger standards) that you could just plug a stationary storage system into. The houses would also be built to include an automatic transfer switch that islands the house during a power outage, and a smart load panel that dynamically decides what loads to back up based on battery capacity and user preferences. But right now, no such standards exist, and no house is built from the start that way, so everything is an expensive retrofit.