And the main reason for high energy costs in Germany are massive investments into the grid, amounting to a planned total sum of 300 billion euros. If you include local grids, it's 700 billion euros.
The grid investment were planned at a time, when battery storage was not viable, and is by many deemed to be excessive, as the average load of the grid is about 15% of the capacity.
Another quirk is that German regulations are currently paying a renewable energy provider for the potential amount of energy, not for the energy amount actually provided. This means that the provider is notifying the grid about the currently available power, and gets paid for being willing to provide the energy, independently of the grid's capacity to make use of the energy. This disincentivizes the combination of renewables with battery storage, and hence letting available renewable electric energy going to waste, because the surplus energy is not stored, but simply switched off. On the other hand, the amount of battery storage projects applied for is currently 20 times higher than assumed in the energy report from 2023, which means that the money planned for the grid might be freed up when some expansion projects are proven to be unnecessary.