The inequality caused by automation is a main driver of cynicism and political polarization, Mr. Obama said. He connected it to the racial and geographic divides that have cleaved the country post-election.

It’s not just racial minorities and others like immigrants, the rural poor and transgender people who are struggling in society, he said, but also “the middle-aged white guy who, from the outside, may seem like he’s got advantages, but has seen his world upended by economic and cultural and technological change.”

Technological change will soon be a problem for a much bigger group of people, if it isn’t already. Fifty-one percent of all the activities Americans do at work involve predictable physical work, data collection and data processing. These are all tasks that are highly susceptible to being automated, according to a report McKinsey published in July using data from the Bureau of Labor Statistics and O*Net to analyze the tasks that constitute 800 jobs.

Twenty-eight percent of work activities involve tasks that are less susceptible to automation but are still at risk, like unpredictable physical work or interacting with people. Just 21 percent are considered safe for now, because they require applying expertise to make decisions, do something creative or manage people.

The service sector, including health care and education jobs, is considered safest. Still, a large part of the service sector is food service, which McKinsey found to be the most threatened industry, even more than manufacturing. Seventy-three percent of food service tasks could be automated, it found.