Germany is already way ahead of the US in switching away from fossil electricity (also ahead of China).
Sure, keeping the entire nuclear fleet from ~2000 would have maybe helped, but would have required very costly (economically and politically!) investments over the last few decades, and those basically went into renewables instead which turned out fine.
See: https://ourworldindata.org/grapher/electricity-prod-source-s...
Is all of their energy consumption met by domestic production?
I definitely wouldn't say that it turned out fine. The push against nuclear transcended into a larger push against electricity, making Germany a laggard in electrification. The car sector certainly isn't doing fine.
It's also funny how air conditioning powered by electricity is discouraged, while air conditioning in ICE cars or gas heating in buildings are at the very least tolerated. It's crazy if you think about it.