True - as a whole. But as things stand now, the owners of the machines get richer, and the displaced workers get significantly poorer.
My concern is this. In ten years time, trucks and taxis will be automated, and vanishingly few truck drivers will be able to retrain as truck computer techs. Truck and taxi driving is the last bastion of badly-educated men, (apart from the military, but automation will be gutting military employment too). So we're going to have a huge (many millions) population of (to generalise horribly) redneck men who like guns and feel worthless.
Even now, 2/3s of gun death in the US is that exact demographic suiciding. I believe these guys gave Trump his victory, and when they realise even he's let them down, those that don't kill themselves are going to revolt.
A UBI could be part of the solution to this nightmare, because it would take the economic aspect out of the equation. It would mean unemployment lost its stigma, because at least some people chose to do their own thing (playing music, carving wood, reading at schools) instead of working for the man. So it would become socially acceptable not to have a paying job.
Sadly I think it's very unlikely to happen, unless the rich figure out that their wealth is going to be redistributed violently if they don't do voluntarily.