The pushback against this year’s populist upsurge has been something to behold. Insider pundits, railing at the intruders, strain to convince themselves of their own good intentions. Establishment brains boggle at the eruption of the excluded. Commentators veer from the implausible to the incoherent. Have you ever seen such a mixture of anger and cluelessness?

Yes, you have. If you’ve spent time at the local zoning board.

There, the kind of conflict that dominated national politics this year has raged for generations. Zoning, backed up by homeowner associations and historic districts, serves mainly to preserve the social standing of residential quarters. Upscale suburbs uphold their status with a battery of regulations that range from minimum lot sizes to lawn-mowing ordinances to bans on overnight parking of work vehicles. Rising urban districts protect their special cachet by fighting off newcomers judged insufficiently hip.

Challenges to the neighborhood status quo trigger the same reflexes of aggression and self-deception that drove commentary on the election campaign. Propose a new building in an affluent area, and indignant protests will explode. The real objection is rarely the one that’s said out loud. Town leaders boast of their inclusiveness as they brandish traffic studies against apartment houses. Tree-loving suburbs demand bigger parking lots. School district boundaries become mini-Maginot Lines.

The zoning apparatus, governed by rules that empower nearby property owners, usually stave off outsider attacks. Presidential elections work differently, but the affluent professionals who dominate political parties and national media were slow to see the distinction.

Housed in the very neighborhoods where land use battles rage fiercest, political insiders defended their turf against assault from below as if lawns and parking spaces were at issue. Dismissive at first, they grew apoplectic once they perceived a real danger. Scenes long familiar at the local level now played out on the national stage.

A case in point was the fury of centrist Democrats against Bernie Sanders. The Vermont senator’s greatest sin was not that he attacked the party establishment. It was that he threatened its self-satisfaction. Party insiders had found it easy to justify alliances with Wall Street and Silicon Valley against a McCain and a Romney. That put them in the comfortable position of a wealthy suburban town fighting a “greedy developer” — no need to think about whom their ban on apartment houses really excluded.

But they no longer found themselves on the side of the angels. So sympathetic pundits, loath to openly defend the billionaire class, dredged up side issues like witnesses at a never-ending zoning hearing. Jonathan Chait of New York magazine saw Sanders as “narcissistic,” “hysterical,” and possibly “getting carried away in a messianic fervor.” Boston Globe columnist Michael Cohen accused him of hypocrisy, “moral preening,” and worse.

Flimsy and self-contradictory reasoning backed up heartfelt obloquy, again mirroring the tenor of zoning meetings. Sanders, Cohen charged, was “more interested in promoting Sanders for president than the issues for which he claims to care so deeply” — as if this represented an argument for Hillary Clinton. Chait criticized Sanders for regarding the domestic economy as a zero-sum game that pits the billionaire class against the rest of us — and then faulted him for failing to see the world economy as a zero-sum game between workers in the US and overseas.

As Sanders gained traction, politicians and pundits turned to platitudes about diversity to defend their own class privilege.

In cities plagued by rising rents, this is a standard recipe for perpetuating housing shortages. Aging San Francisco hippies with paid-off mortgages defend the Latino character of the Mission against plans to put apartments on parking lots. A Seattle anti-displacement activist pledges unconditional support for exclusionary zoning. Brooklyn politicians fight off new housing whose occupants might threaten their power base by denouncing a nonprofit builder of affordable housing as a gentrifier.

“If we broke up the big banks tomorrow,” Hillary Clinton famously asked, “would that end racism?” Madeleine Albright, now cashing in as a hedge-fund chief, spoke of a “special place in hell” for women who voted against female candidates. One widely read article criticized Sanders’ call for unity against the billionaire class on the ground that it “reduces all people to America’s ‘neutral’ identity: the white heterosexual man.”

The populist explosion discomfited Republican elites as it did their Democratic counterparts. Establishment pundits like George Will and David Brooks assailed Donald Trump in language that matched the attacks on Sanders in vitriol. If their criticisms were often sound in substance, an obvious question went unasked. Why had the constituency they cultivated for so many years now abandoned them?

Watching Brooks or Will hold forth with preppie dress and mannerism, it was easy to picture your local historic preservationists.

Through long and diligent labor, their little group has roused public opinion and saved a block of run-down old homes from demolition by the housing authority. Now comes a casino mogul who buys one of the old houses. He wants to tear off the porch, add a floor on top, and redo the trim in marble and gold. Our preservationists watch their supporters melt away. They are shocked — shocked! — to discover that their neighbors don’t really care about fine architecture. All they ever wanted, when they fought off public housing, was to keep the riffraff out.

Centrist Democrats offered the opposite misreading of the Trump electorate. Their analyses, painting Trump voters as irredeemably racist, served more to demonstrate the analysts’ superior virtue than to win votes. “A more populist-sounding appeal doesn’t actually do diddly squat,” Amanda Marcotte wrote, “to convince people who are voting their racist and sexist resentments.” Pundits like Jeet Heer and Matt Yglesias pointed at wealthy Trump backers to mock the idea that lost jobs and falling wages might influence voting patterns.

The political professionals who ran Hillary Clinton’s campaign did not escape the self-deception. The swing voters, their dogma insisted, were the centrist inhabitants of upscale suburbs. So they avoided talk of economic justice and made appeals that reinforced social distinctions. Trump is uncouth, they told the voters. He uses naughty words. His marble-and-gold architecture, the campaign all but said, is just too tacky for our tasteful neighborhood.

On November 8 came the apocalypse. Its lessons are only starting to be absorbed.

Zoning board politics are still an option. The rising resistance to Donald Trump can retreat to its own neighborhoods — some protected, and some horrifically vulnerable — and bask in feelings of group identity and moral superiority. But it might also learn from defeat, and reach across lines of culture and race to do the hard work of rebuilding a progressive majority. It’s a choice between the politics of social status and the politics of social justice.