Tens of millions of jobs will be replaced in the next 50 years, with absolutely no garantee that new jobs would somewhat emerge out of nowhere, especially jobs where humans are better than AI, which will keep improving over time. How to address this issue? Well the obvious answer is the need for a Universal Basic Income in the future... How do we finance that? By heavily taxing goods/services produced/provided by robots and machines. Eeh I can already feel the crypto-anarchists cringing at the idea of governments having such an important role in our lives.
But honestly if anyone has a better idea, please share, cause no-one has found it yet.
One way to reduce government impact would be to keep the idea of a UBI based on taxation, but to use blockchain technology to implement it. I'm not a programmer nor a blockchain technology expert by any means. But if we take your example of the machine producing 50,000 phones, basically in order to be legally allowed to be sold, the machine would be forced to document the creation of each phone to the network; Once the item is sold- an action that should also be documented-, the selling company is automatically taxed and the money is directly and equally distributed to the wallets of every citizen aged over 18. The security and reliability of the network could be garanteed either by the government, or better, by elected citizens of the country (kind of like steemit witnesses), even though they would still probably need government support given how important their job would be. This would lead to the creation of national crypto-currencies, since laws don't extend over borders. Imported goods would have to provide proof that they were produced by humans, and would be taxed if they weren't. As I said I don't know anything about blockchain technology and I have no clue of what I'm talking about. This is a extremely simplified idea of how it could be done, it surely has many flaws and may not be even implementable.