Two words: basic income.
I debate this all of the time, and I hear guys like Marc Andreessen play it down, and I think he's wrong but only to an extent. I think there's a major risk of mass automation, especially when blockchain decimates back office jobs in banking (which typically pay good middle class wages) and clerical jobs in law. Then you will have white collar unemployment.
However, I think there are plenty of jobs that can be created - the problem is that our infrastructure and cultural mentality towards technical education is lacking. Society needs to understand that math, programming abilities, etc. are absolute must haves if you want a middle class or better lifestyle in the new economy. There are masses coming from China, India and Russia that are becoming extremely successful in the US because there is a huge emphasis on technical education in those countries. I work in Silicon Valley and we hear all of the time that companies like Google and Apple have very difficult time finding people with the skills to do what they want to do...so those jobs are there. The problem is that there's a couple thousand extremely talented foreigners (and some Americans) who bounce around from tech company to tech company for increasingly higher pay. The jobs are there and will be there - you're just going to have to know how to math/code/blockchain like a boss.