If 40% of that was renewable, that puts renewables' portion at around 200 TWh
It's hard to find consolidated recent figures for German electricity storage capacity, but everything I can find lists it in double digit GWh at most, including battery and pumped storage capacity. https://www.hydropower.org/country-profiles/germany https://www.energy-storage.news/germany-growth-in-home-and-i... https://www.energy-storage.news/residential-segement-continu...
So there's clearly some creative accounting going on behind that 40% figure. Maybe it's 40% of raw power produced that then gets exported and pays for other sources or something, or maybe that 40% is strictly during the day and can't be replicated at night. But it's clear the storage necessary for a completely renewable grid is lacking by multiple orders of magnitude.
Of course, you need baseload power generation for non-peak power, and DE really should have stayed with nuclear for that instead of pushing coal/gas.