AI and robots may upend jobs by 2040, worsening inequality; history suggests new work emerges, but it’s unseen today.