Take a tray of hungry, wiggling worms; feed them a feces-only diet sourced from toilets; and then, once they’ve digested the lot, collect sack upon sack of worm shit to grow your food.

Not a pleasant picture, right? But then neither is having to duck behind a bush or squat in a ditch to do your daily business. It may be 2019, but defecating in public remains the day-to-day reality for millions of adults and children worldwide, many of whom live with no access to sewage systems.

Resolving this indignity is the driving force behind Tiger Toilets, the startup venture behind the wacky worm-inspired idea. The toilet design itself, which costs 25,000 rupees (around US$350) per unit, isn’t complicated. As with most no-plumbing lavatories, Tiger Toilets’ invention uses a septic tank system. People flush as usual, but instead of all the waste disappearing into a tank below, a porous layer above the tank captures the solid bits.

It’s on this drainage layer that the worms can be found. The limbless invertebrates are a variant of an earthworm ― known formally as Eisenia fetida and less formally as tiger worms ― that is commonly found in India, where Tiger Toilets is based. Given that more than 700 million people in India currently lack access to basic sanitation (a figure more than double the entire U.S. population), the firm hopes to find many ready customers.

Tiger Toilets A Tiger Toilets digester, complete with worms and some starter compost, is ready to be installed and connected to a toilet.

Finding somewhere private to poop is not a problem most of us in developed countries ever need to think about. But if you live in a slum or rural area in a poor country, it’s a very different story. Fortunately, some of the world’s most inventive brains are now trying to solve what policy wonks call the “open defecation” problem.

The primary beneficiaries of their ideas are likely to be women and children. For women who must relieve themselves outdoors, the risk of being harassed, or worse, is high. Only a few months ago, a teenage girl from a village in the south Indian state of Tamil Nadu died after a vicious sexual assault during a trip to the toilet. As for children, an estimated 2,195 youngsters less than 5 years old die every day of diarrhea, which is endemic among those lacking access to a hygienic toilet.

Among the breakthrough solutions currently under development to try to fill this huge gap is the Nano Membrane Toilet. Developed by Cranfield University in the U.K., the toilet works without electricity or water ― two resources that aren’t always available for the poorest people in developing countries. Instead of flushing with water, the toilet bowl rotates so the waste falls into a vat underneath. A scraper mechanism makes sure nothing is left behind.

Once the waste is in the vat, the science kicks in. The liquid (urine for the most part) is separated out, using thin hollow fibers known as nanofibers. The resulting water vapor is then passed through a membrane wall, which removes all the bugs and pathogens from the water. Once the vapor condenses back into liquid form, it can be used for irrigation, washing or ― believe it or not ― drinking.

As for the poop, it is lifted into a separate holding chamber with the help of a mechanical screw. There it is left to dry out before being transferred to a combustor that converts it into ash and energy. While the ash is thrown away, the energy helps power the membrane process. Any leftover power can be used to charge a mobile phone or other low-voltage device.

The common denominator between the design of the Nano Membrane Toilet and that of Tiger Toilets, both of which are still at the pilot stage, is that they have the support of one of the world’s richest men. Since 2011, Microsoft founder Bill Gates has issued more than $200 million in grants to come up with a low-cost, low-tech toilet suitable for those without plumbing or electricity.

Speaking last November at a global summit in China about toilets, Gates said that unsafe sanitation kills nearly 500,000 children under the age of 5 every year and leads to an estimated $223 billion a year in health-related costs and lost productivity and wages. This puts a huge economic burden on countries that can least afford it, he said.

ASSOCIATED PRESS Bill Gates stands next to a jar of feces as he addresses delegates at the Reinvented Toilet Expo in China in November 2018.

Gates is convinced that poop can pay, predicting that low-cost toilets will grow into a $6 billion-a-year market by 2030. Holding up a glass jar of sludge-colored feces, the billionaire told summit delegates that there is no time to lose. “The problem will get worse if we don’t do something about it,” he said, pointing to predicted population growth, urbanization and water scarcity over the coming decades.

But solving the toilet reinvention challenge, as Gates calls it, isn’t just about smart design. Poor sanitation, said Sheila Kibuthu, a spokesperson for the sanitation-focused social enterprise Sanergy, is ultimately a “systems-based problem”: how to finance the toilet, how to maintain it and how to dispose of the waste.

Sanergy, which currently operates in 11 neighborhoods across the Kenyan capital of Nairobi, works with local entrepreneurs, who install the firm’s prefab community toilets and then earn a maintenance fee from users. As a further source of revenue, the byproduct of the latrines ― feces ― is collected and sold as fertilizer.

Sanergy One of Sanergy's franchisees, known as Fresh Life Operators, is set in the Mukuru kwa Njenga neighborhood in eastern Nairobi, Kenya.

Affordability is critical, Kibuthu said. Sanergy’s community toilets cost around $350 to assemble ― far less than conventional community toilets, which can run as much as $25,000.

Treating residents of these poor neighborhoods as customers rather than charity cases is also key to making Sanergy a success, said Kibuthu. This means, for example, looking at “what solutions do they prefer.”

Andrew Foote, founder of Sanivation, another Kenya-based company, agrees. Like Sanergy, Sanivation generates revenue from the waste it collects. It uses its own patented solar thermal technology to convert the leftover “fecal fudge” into charcoal-like briquettes that can then be used for cooking and domestic heating.

Sanivation’s success hints at the multibillion-dollar industry predicted by Gates. The firm currently operates three waste treatment plants, provides services to over 20,000 people and generates full-time employment for more than 80 people in Kenya.

Untreated human waste contaminates the environment and provides a pathway for transmission of diseases, and children are particular vulnerable, said Kelly Ann Naylor, UNICEF’s associate director for water, sanitation and hygiene. While global health and humanitarian organizations are working on the problem, Naylor added, “More needs to be done and differently ― innovative solutions are a key part of addressing this age-old problem.”

For Foote, the more that people start following Gates’ lead and talk about the icky business of defecation, the quicker an effective solution will be found to this global problem.

“When human waste has value, instead of it being something people don’t talk about,” Foote said, “you can help professionalize the sector and bring it out of the shadows.”

For more content and to be part of the “This New World” community, follow our Facebook page.

HuffPost’s “This New World” series is funded by Partners for a New Economy and the Kendeda Fund. All content is editorially independent, with no influence or input from the foundations. If you have an idea or tip for the editorial series, send an email to thisnewworld@huffpost.com