Arnd Wiegmann / Reuters

The World Economic Forum in Davos has a reputation for being a kind of alpine Burning Man, except the thing being sacrificially flambéed is a sense of modesty. Attendance may seem like a dangerous proposition in these populist times. But last month, professional duty and morbid curiosity led me to board a plane to Switzerland. Besides, Davos felt like an occasion to buttonhole some experts on a question that had been on my mind: If the world is getting better, why does everything feel so terrible?

The values of free thinking, free markets, and free trade have led to a historic reduction in global poverty, ever-rising life expectancy, and ascending IQ levels. Undernourishment and maternal deaths are both down more than 40 percent since 1990. “All this has happened chiefly because countries—from China to India to Ethiopia—have adopted more market-friendly policies,” the CNN host Fareed Zakaria wrote in The Washington Post.

If these statistics were the only thing you knew about the world, you would be shocked to read just about any news article about the state of Western democracy. In country after country, in Europe and in the Americas, nativist movements are gaining power by opposing the values of openness and empiricism. These nativists have often thrived by arguing that free markets and globalization have impoverished the middle class and destroyed all sense of national identity or sovereignty.

Global capitalism appears to be saving the world and destroying the West, at the same time. I went to Davos to see whether I could resolve the paradox or, in failing to do so, at least drown my ignorance in hot chocolate.

My first lesson, however, wasn’t in global economics, but local real estate. A month before my trip, there was no available hotel room within three hours of the conference hub. Davos, a tiny Swiss village, doesn’t have enough space for WEF’s thousands of attendees. Hotels along the town’s main artery, the Promenade, jack up their rates to levels only corporate executives or multimillionaires can afford. This forces the conference’s ordinary joes either to settle in nearby villages connected by train or (as in my case) to stuff themselves into basements, bunks, and pullout couches.

This might sound like an irrelevant aside, but for those in the market for a globalization metaphor, it may be impossible to beat: At a conference symbolizing the promise of capitalism, every non-plutocrat is fighting for scraps.

In 2009, in the nadir of the Great Recession, the elites who convened at Davos agreed that the solution to the failure of globalization was more globalization. Then–British Prime Minister Gordon Brown called for a new Bretton Woods Agreement, referring to the 1944 conference that established the postwar order by creating the World Bank and the International Monetary Fund. “We live in an interdependent world, and the only way to move forward is to cooperate,” Kofi Annan, former secretary-general of the United Nations, said in agreement.

Ten years later, it seems obvious that the reaction among the richest countries in the world has been quite the opposite—not global integration, but global disintegration.

To get a handle on what’s happening, I first met James Manyika, the director of the McKinsey Global Institute (MGI), in the lobby restaurant of the Ameron Hotel. If you want to know where the nativist revolution is coming from, he said, a simple story must be told.

In 2016, Manyika co-wrote a landmark report on earnings growth in advanced economies over the previous 20 years. It was a tale of two decades, he said. In the first 10-year period, from 1995 to 2004, wages grew for at least 98 percent of households in just about every advanced economy. But in the second decade, from 2005 to 2014, everything fell apart.

“We found inequality, yes. But that was the least interesting thing we found,” Manyika told me. “The more interesting thing was wage stagnation in almost all the advanced economies.”

This was an entirely new phenomenon. Wage income declined for the majority of households in France, the Netherlands, the U.K., and Italy. The U.S. had it even worse. Four out of five households saw flat or falling income before accounting for taxes and transfers. Between globalization, the Great Recession, and the not-so-great recovery, the middle class was slammed.

And they felt it, too. Manyika’s research team asked more than 6,000 people in the United States, the U.K., and France to describe their economic status. Between one-third and 40 percent of respondents in each country felt that their incomes were falling behind. “And these people tended to blame free trade and immigrants for hurting their wages and ruining their culture,” Manyika said.

MGI was putting its finishing touches on the report in early 2016, but held its publication for the Brexit vote in March. “We weren’t surprised by the outcome,” Manyika told me. “We had been sitting on this research showing widespread resentment toward globalization as a result of people feeling like they were being left behind.” In June, MGI published the paper under the title “Poorer Than Their Parents.” That same week, the labor economists Brian Bell and Stephen Machin published a separate analysis of the Brexit outcome. The economic statistic most closely aligned with “Leave” votes wasn’t unemployment or income at the local level. It was poor wage growth.

Anti-elite sentiment “has become the most potent political force in Europe,” writes Martin Gurri, author of The Revolt of the Public and the Crisis of Authority in the New Millennium. “It brought Brexit in Britain, electoral defeat to German chancellor Angela Merkel, drove protests in France, shattered so many political coalitions that governed Europe since World War II, and raised to prominence new parties and persons nominally attached to the right or the left but always fractious, sectarian, ‘populist.’”

But economic challenges probably aren’t sufficient to explain the emergence of these “new parties and persons” that prey on xenophobia and racism as much as they appeal to class resentments. The changing media landscape is part of the story, too.

For years government elites could silence political outsiders by denying them an audience. In the late 20th century, the Democratic and Republican Parties were terrifically effective at marshaling elite power to shape public opinion during the presidential-election process. Voters didn’t select candidates at random; rather, as political scientists like to say, “the parties decided” on the favored candidates and used their power to funnel voters toward these insiders.

That was before the Cambrian explosion of digital media made it impossible for insiders to control their nomination processes. Social networks large and small, such as Facebook and Gab, allow fringe ideologues to find one another, build an online movement through angry online rhetoric, and bypass the traditional party and media structure to reach disaffected voters.

Around the world, far-right movements have excelled at using new media to stir anger against the establishment. In the United States, YouTube has become “ground zero for far-right movement recruiting.” In Germany, the right-party AfD has more than twice as many Facebook followers as Angela Merkel’s party. In the Czech Republic, online news is dominated by the “virulently xenophobic” ParlamentniListy, which feeds its audience stories of radical Islamic atrocities and alt-right talking points.

Globalization and poor governance created the conditions in which nativist insurgencies can grow. Social networks made it possible for political cults to organize around outrage.

On my last day at WEF, I was sitting at the juice bar of the Kongresszentrum, which is either the Mecca or the Mordor of Davos. My companion was Adam Tooze, the Columbia University economist whose recent book Crashed is a magisterial history of the Great Recession’s legacy.

Too often, Tooze said, commentators describe the populist wave as if it’s a monolithic movement. “I don’t like the word populism, because populism isn’t any one thing,” he said. “It’s diverse, it’s idiosyncratic.” Donald Trump may call himself Mr. Brexit, but Brexit and Trump are distinct expressions of anger.

But there’s a good reason that commentators tend to lump together Trump, Brexit, and other “populists” and “populist” movements: They’re built to oppose rather than lead, and right now it’s fair to say they’re in a shambles, unable to fulfill their nativist promises. In the U.K., Prime Minister Theresa May’s Brexit deal was voted down in humiliating fashion. In the United States, Trump’s record-breaking government shutdown led not to a wall but to declining poll numbers for the president. Both May and Trump had to cancel their appearances at the Swiss conference.

Right-wing nationalism is the solution that solves nothing. What’s needed instead is a movement that doesn’t just succeed in outraging voters, but actually seeks to use government to address the source of their outrage.

In the United States, those on the left are trying to build such a movement within the Democratic Party. What they seek, in brief, is to pay for universal programs with a new set of taxes for winners in the capitalist system.

There are features of the new American left that some might find reminiscent of the new American right, like a deep distrust of global capitalism, an exasperation with the establishment, and a talent for social media that sometimes devolves into self-described dirtbaggery.

But it would be a mistake to say that left-wing populism is simply the mirror equivalent of the right. While Trump is perhaps the least popular president in modern history, Senator Elizabeth Warren’s proposed wealth tax is quite popular among Democrats. Representative Alexandria Ocasio-Cortez’s suggested 70 percent marginal rate on American deca-millionaires is supported by, conveniently, 70 percent of all voters. “Medicare for All” also attracts large majorities, though the slogan seems to mean different things to different people.

What’s more, taxing the rich to fund universalist programs directly addresses middle-class insecurities caused by global capitalism—unlike, say, building a giant border wall. Free markets without income security have been a recipe for instability. So have socialist policies that stamp out free markets. But some members of the American left seem to be pointing to a compromise: a new system of universal guarantees supported by higher taxes and higher peacetime deficits in this context of a capitalist system. That would include health care for all, a child allowance, and an expanded system of wage subsidies to ensure a basic standard of living for Americans.

If this movement is going to succeed, however, it will have to identify not only global capitalism’s problems, but also its benefits. There is no question that free trade and increased immigration have reduced poverty and improved global living standards at a historic rate in the past 30 years. For all the hatred directed toward the Davos crowd, there will be no economic growth in the West without policies that promote entrepreneurship and innovation.

Climate change offers an interesting challenge for the movement. The Green New Deal, an environmentalist platform that would include massive public-sector investments in clean energy and infrastructure, is a part of the left’s effort to rebalance the economy away from free markets and private goods. But any realistic plan to decarbonize the U.S. economy will almost surely require the sort of commercial technological breakthroughs that tend to come from private entrepreneurs tinkering with the products of publicly funded research. And to reduce global emissions, the United States will have to share its eco-technology with China, southeastern Asian countries, and African nations, which account for most of the growth in future emissions. In other words, saving the American middle class might take a leftist intervention, but saving the world will also require something very much like free-market globalism.

The new American populism running against elites and billionaires will have to strike a balance—to burn Davos Man in effigy while sparing his best ideas from the fire.

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.