ROTHENBERG, Germany—Germany has set some of the most ambitious goals of any nation for shifting from fossil fuels to greener energy. Now the centerpiece of that push—onshore wind power—is slumping, prompting the loss of tens of thousands of jobs and the bankruptcies of wind-power developers and turbine manufacturers.

Wind power, often seen as a clean, abundant energy source, has faced growing bureaucratic hurdles and acrimony in communities out to block the erection of new turbines.

...