Along with its domestic production, Sweden also imports trash from Norway and Britain each year to fuel power plants. These countries pay Sweden to accept their trash because it can be cheaper than paying landfill taxes, Mr. Wiqvist said. Sweden has not run out of garbage to burn, but more plants have been built to use an available fuel source.

Waste-to-energy is also thriving elsewhere. Japan already incinerates up to 60 percent of its solid waste. China has more than doubled its waste-to-energy capacity from 2011 to 2015, according to a World Energy Council report.

Burning trash for energy seems particularly practical for large, developing nations that lack modern trash disposal systems where garbage poses a massive environmental and health threat.

In developing countries trash is typically carted to mountainlike dumpsites where methane causes fires. Such sites often lack the concrete or plastic linings found in modern “sanitary landfills” and can leach toxins into soil or water supplies. Garbage dumpsites are also serious hazards for poor people who pick through rubbish to scavenge recyclables by hand.

Another issue is that developing countries with warm or tropical climates wouldn’t need to heat homes with energy from trash-powered plants. But Mr. Arnberg of IVL, who has consulted for energy projects around the world, said that heat could be harnessed in a different way. For example, heat could power industry such as paper mills, food processing plants, brick kilns or a soap factory set up nearby.

Building large, effective infrastructure projects requires good governance and sound business practices. Waste collection needs organized infrastructure and logistics. And importantly, citizens need to be educated about proper disposal of waste.

“If you have citizens who don’t how to use the system,” Mr. Arnberg said, “it doesn’t matter how much you invest.”