Well, I'm not sure UBI really solves the issue. Also, replacing labour with machines is not really the problem here; agriculture and industry still require lots of people, it's just that those sectors aren't the ones making the profits. The profits are going to software and finance, but we still need the agriculture and industry to run, and they still need lots of people.