You assume that robots/algorithms will never be as good at some jobs as a worker with median abilities. This is a very strong (and likely wrong in the long term) assumption to make.
At least I doubt it will happen in this millennium. We have much more real problems today. The world is in a bad place and instead of trying to save resources, make it a better place for our kids, we focus on providing more social benefits. I have been living with people with difficult financial situation for a while and the last thing they needed was handouts. They wanted jobs, work, way to interact with people and learn new things. Not free money.