For those without access to private toilets, lockdowns also made publicly available restrooms even scarcer than they normally are. This was particularly hard on the unhoused population, as well as those with intestinal and other disorders. In the slums of some of the world’s fast-growing cities, shared facilities—sometimes the only ones available—often remained open but made social distancing difficult.

It’s not only wastewater infrastructure that’s aging or at risk; the sanitation workforce is too. In the United States, the sector is facing a wave of retirements sometimes dubbed the “silver tsunami.” As the pandemic began, a few wastewater utilities, afraid of losing their critical, hard-to-replace older workers to illness or worse, locked down their facilities with the workers inside for weeklong shifts, so that the virus couldn’t enter. In India, sewer cleaners, who often come from a highly stigmatized caste, petitioned the government for simple personal protective equipment so that they could keep doing their critical jobs.

The solution to our poop problem isn’t only to rebuild conventional infrastructure, but also to adopt a variety of more recent innovations, as well as encourage new ones, that will make our toilets much better—healthier, more sustainable, and more equitable. For this to become a reality, state and local governments will need sufficient funding as well as new public policies that create incentives.

Fortunately, the Biden administration seems to be taking steps in the right direction. The president’s recent infrastructure bill calls for modernizing “aging water systems [that] threaten public health in thousands of communities nationwide.” (Exactly how much money will go to wastewater specifically isn’t yet clear.) An infusion of federal funding could open up many avenues to improvement: Where centralized infrastructure already exists, cities can use both established and new tools to mine sewage for heat, water, nutrients, chemicals, and precious metals, as well as for biogas and other forms of fuel far more than they already do; digital sensors suited for the harsh sewer environment can help overtaxed systems use pipes more intelligently and reduce spills; novel installations can pull used toilet paper out of sewage streams before it gets to treatment and recycle it into cellulose, a raw material with broad applications, or even valuable industrial chemicals. With the right tools, even fatbergs—congealed masses of trash that cause damaging and expensive sewer clogs—can become biofuel thanks to the oils, fats, and grease in them, though it would be better for people to stop flushing wipes and disposing of oils down drains altogether.

And there are more radical reinventions in the pipeline too. Small distributed systems that treat toilet waste and reuse water on site (in buildings or communities) are developing quickly. Container-based sanitation businesses are working to provide regular pick-up service. And “urine-diverting” toilets, which separate high-nutrient, low-pathogen urine from feces and water, act more like recycling bins than trash cans. These innovations can be more suitable to tough contexts, more resilient to extreme events, have smaller climate impacts, pollute less, and produce resources such as clean water, compost, fuel, and even insect protein. They could also create revenue streams and provide safe, well-paying jobs in sanitation—ones that bring in the kind of young, environmentally minded, and diverse workers the field needs. Many of these concepts are in the pilot and demonstration phase; to make them a reality on a larger scale, they need more investment, government policies that support their efforts, and the buy-in of everyday people who are willing to overcome squeamishness to become early adopters of innovative toilet technologies.

Other promising innovations have to do with those little bits of the coronavirus genetic material in poop. Toilets and sewers effectively take stool samples from us everyday. Scientists around the world have already been analyzing sewage, providing feedback to public health experts and policymakers about new outbreaks, trends, and the effects of rules and restrictions. They’ve even managed to catch and halt outbreaks early on in settings like college dorms. It’s not hard to imagine medical toilets of the future—like one that’s already on the market for senior living centers—warning us when we have been infected. These efforts could continue to pay off for years to come, even after the pandemic, in terms of monitoring not only for the coronavirus but other diseases and health threats.