You have the causation exactly backwards. Most of Germany's heavy industry disappeared or went offshore since the 1970s, and that's why we don't produce nearly as much energy.
This process predates both the green energy movement and the nuclear power exit. Steel and aluminium manufacturing just needed more power than dozens of buildings filled with office workers.