“My biggest boneheaded move,” Mr. Obama mused.

He was right. Democrats should stop insulting people. The high cost of doing so is dramatized by “I’m deplorable” T-shirts and Inaugural DeploraBalls. There’s no need to accept racism, sexism or homophobia from working-class whites or anyone else. Just live up to our progressive ideals by acknowledging social disadvantage more consistently. If class-based insults were as politically incorrect as racial or homophobic slurs, Rush Limbaugh’s rants against P.C. elites might hold less appeal. Mr. Limbaugh, like Mr. Trump, feeds off class resentment. Let’s stop making their jobs easier.

That’s the first step. The second is for Democrats to advocate an agenda attractive to low-income and working-class Americans of all races: creating good jobs for high school graduates. The college-for-all experiment did not work. Two-thirds of Americans are not college graduates. We need to continue to make college more accessible, but we also need to improve the economic prospects of Americans without college degrees.

Accepted wisdom that decent nonprofessional jobs are gone for good lets elites off the hook. In fact, the United States has a well-documented dearth of workers qualified for middle-skill jobs that pay $40,000 or more a year and require some postsecondary education but not a college degree. A 2014 report by Accenture, Burning Glass Technologies and Harvard Business School found that a lack of adequate middle-skills talent affects the productivity of “47 percent of manufacturing companies, 35 percent of health care and social assistance companies, and 21 percent of retail companies.” Middle-skill jobs are important jobs: radiology technician, electrician, modern robot-heavy factory worker, emergency medical technician, wind turbine technician. In some cities, a construction boom is hobbled by a lack of plumbers. We might ameliorate this problem if we stopped talking about plumber’s butt.

Democrats should champion a new education-to-employment system in which high schools, community colleges and universities work with businesses and unions to develop certificate programs that deliver job-ready Americans who have the specific skills needed by local industries. These programs should be shorter than college, with flexible scheduling suitable for adult students with families who may very well need to retrain again and again as jobs mutate in a fast-changing world. Skillful, a partnership among the Markle Foundation, LinkedIn and Colorado, is one initiative pointing the way. Skillful helps provide marketable skills for job seekers without college degrees and connects them with employers in need of middle-skilled workers in information technology, advanced manufacturing and health care.

Democrats have given Republicans the priceless gift of letting them be the party that talks more about good jobs for working-class Americans. What’s the Republican jobs program? Supply-side economics, which is bad science but savvy politics, because it communicates to working-class whites that Republicans understand what they want: jobs. I don’t believe tax cuts for the rich are the answer. But the Democrats’ failure to communicate a meaningful alternative means that all Mr. Trump has to do to own the jobs issue is jawbone a few companies, propose tax cuts and sing the praises of coal.

When economic resentments are not addressed, they morph in ugly ways. Immigration provides an example. In 2014, the Republican leadership in Congress was moving toward immigration reform, driven by concern about alienating Latino voters. This momentum halted when Eric Cantor, then the House majority leader, was “primaried” by an unknown libertarian candidate, David Brat. Opposition to Mr. Cantor originally focused on crony capitalism and the Wall Street bailout. Mr. Brat didn’t stop there. Instead, he attacked the “amnesty” immigration reform he accused Mr. Cantor of supporting. In a speech, he hit the nail on the head: “Virginia is ground zero in the fight to protect American workers. If we want to stop amnesty, then we must stop Eric Cantor on this Election Day, June 10.”