This idea was written about by Isaac Asimov in one of his Robot short stories.
AI and robots may very well transition the world from the economy of scarcity to an economy of surplus. Technology makes fewer workers necessary every year.
This has been the dream of progressives for one hundred years. There are an almost infinite number of ways for this to go wrong and literally no way to go right.