New polls show that Hillary Clinton is doing extraordinarily well among upper-class whites — partly the result of many decades of erosion of Republican margins among this group, and partly the result of Donald Trump's abysmal polling among educated people generally. She is now poised to win white college graduates outright, something no Democrat has done since at least 1956.

That's good news for her chances in November. But Democrats — and African-Americans — should be wary of such an electoral coalition. It strongly resembles the one built by the Republican Party after the Civil War — one which eventually collapsed due to the class and racial frictions contained within it.

Let's replay the tape. In the decade after the Civil War, a faction of the GOP called the Radical Republicans built a political coalition between recently enfranchised freedmen in the South and respectable business-minded voters in the North. The glue of this coalition was the "free labor ideology," which insisted that orthodox capitalism — consisting of contract and property rights, manhood suffrage, the gold standard, union-free labor markets, and a reasonably equitable distribution of land — would provide a fair and decent standard of living for everyone, as well as a chance for advancement for the lower classes.

Republicans balked at providing the freedmen with any substantial material benefits, but they did defend their black voters' suffrage, up to and including repeated use of federal troops and law enforcement to suppress white supremacist terrorism. Overall, the free labor ideology was never very plausible, but it was good enough for government work.

All that changed with the crisis of 1873. This was a financial panic that augured in a two-decade depression, and Republicans were caught totally flat-footed. As Herbert Hoover would later discover, orthodox capitalism is completely incapable of solving mass unemployment. On the contrary, tight money and balanced budgets only make the problem worse.

Republicans were obliterated in the midterm elections of 1874. But worse still, around this time a growing faction of Liberal Republicans — many of them former Radicals — began propagating a more brutal version of the dominant ideology. They were steeped in classical liberal writings, and had "progressive" journals like The Nation and The Atlantic Monthly as their house organs. This faction, containing many of the most educated people in the country, successfully mobilized against economic stimulus, convincing President Grant to veto a currency bill which would have provided for more inflation, spending, and employment.

They also attacked the corruption of Republican machine politics and black-led Reconstruction governments in the South. These latter arguments increasingly partook of racist stereotypes from Southern whites about black incompetence and inability, and made excuses for or outright supported white supremacist terrorism. (Naturally, they ignored the fact that corruption in reconstructed states was no worse than average for the time). More and more, the Liberal Republicans accepted Southern Democrats' arguments that blacks should not be allowed to hold office.

All this created an extremely close election in 1876, whose outcome was disputed. After some wrangling, Republicans basically traded the presidency for their black voters in the South. Rutherford B. Hayes got the White House, and black Americans got a century of Jim Crow.

Now, of course, there is no neat one-to-one historical decoder ring to be found here. But I think a few broad-strokes lessons are evident.

The first is that an alliance between upper-class and lower-class segments of society is inherently unstable. To maintain their grip on power Republicans should have fixed the economy, but they were unwilling to abandon their orthodox economic ideology — instead, they abandoned their commitment to black suffrage. Today, Democrats do not believe in the gold standard — but they are still depressingly willing to pay obeisance to austerian notions about balanced budgets.

The second is that upper-class white people have been highly unreliable partners in the quest for racial justice throughout American history. Educated white Republican politicians and elites, nurtured on the latest progressive theories, grossly betrayed their black fellow citizens in 1876 — and at a time when that population made up its single most loyal voting block. Writers have repeatedly dissected the racism of downscale Trump voters, but I'll take the worst Trumpy fulmination against the darkest days of The Nation.

It's hard to imagine rich Democrats abandoning the franchise as the Liberal Republicans did. But it is easy to imagine them balking at the expense necessary to attack racism head on. Bringing all black Americans to an equal share of citizenship, including an attack on police brutality, must involve a tremendous expansion of the welfare state to eradicate poverty. Despite the apparent left-leaning views on economic matters among current upper-class whites, it's a safe bet that if huge tax hikes come up to pay for such a program, they'll conveniently discover some different opinions.