Welfare State 2040
Most who have looked carefully believe that many or even most of today's jobs could be obsolete by 2030 or so. Truck and cab drivers, warehouse workers, radiologists, fast food workers, translators, restaurant cooks and bartenders to name a few. As robots and AI become ever more capable, fewer and fewer jobs that require a direct human presence will be available. The global unemployment crisis is likely to get much worse.
The profits of the robot revolution will likely go to the owners of capital in the businesses in which humans have been replaced. This implies that already great economic inequality will continue to rapidly increase, even without such monstrosities as the new American tax law. So should we look forward to a world where the rich use their armies of military robots to suppress or exterminate the starving poor?
The only obvious alternative is a greatly expanded welfare state. One proposal (that I really don't care for) is the guaranteed basic income - paying people to do nothing. Of course the old saying is that idle hands do the devils work, and that's not a bad analysis. A better idea, I think, is the guaranteed or at least highly subsidized job, preferably employing people to do things that humans like to do, mostly building, handcrafts, and arts. Does your small town have a paid symphony orchestra and ballet company plus a few live theaters? Maybe it should.
Before that time comes, though, there are lots of things that need to be done, like repairing and improving infrastructure, caring for the elderly and infirm, and treating the ill.
Of course it's entirely possible that by 2040 the robots will have already decided that humans are an expense that the planet can't afford.