Ms. Merkel, of the traditionally conservative and pro-business Christian Democrats, came up with her plan in 2011, in the emotional aftermath of the Fukushima nuclear disaster in Japan. It envisions shutting down all of Germany’s nuclear plants by 2022 and shifting almost entirely to wind and solar power by 2050.

The chancellor’s about-face not only seized the energy initiative from her center-left opponents, it also amounted to a gamble that could prove to be her most lasting domestic legacy — or a debacle whose consequences will be felt for generations.

The cost of the plan is expected to be about $735 billion, according to government estimates, and may eventually surpass even that of the euro zone bailouts that have received far more attention during Ms. Merkel’s tenure. Yet as the transition’s unknowns have grown, so have costs for the state, major companies and consumers.

Mr. Taeuber showed up last Friday, one of three “walk-ins” that day at one of two agencies in Berlin offering aid to people struggling to pay their energy bills. He arrived just as employees from the power company Vattenfall were on the way to his apartment.

Sven Gärtner, an agency employee, called Vattenfall with the promise of a payment plan, sparing Mr. Taeuber from being disconnected. “The boys were already in the basement, but they agreed to pull them back,” Mr. Gärtner said triumphantly.

Since January, Mr. Gärtner said, his group has intervened in more than 350 cases to prevent Vattenfall from leaving one family or another in the dark. In the first six months of this year, about 1,800 sought help, 200 more than in all of 2012.