Humanity won't ever run out of jobs. It used to be that 80% of people worked in agriculture in order to feed everyone. Nowadays we are so efficient at agriculture we get the same amount of food (actually more, hence the obesity problem) with only 5% of the population. I'm sure at the time there were people saying society was doomed, as the farming jobs dried up.
So now we are getting better and better at making manufactured goods. Some day soon only 5% of people will be doing that. Are we doomed this time? I doubt it. Not as long as there are people with ideas.
As existing industries become more efficient and lay off workers, the supply of available labour increases, and so the price of labor falls. This makes it suddenly affordable to try out ideas that were too expensive to try when everyone was employed in existing industries, and had to be bid away from their existing employer. And all it takes it one or two of these ideas to work to create thousands of jobs. One example is the iPhone, it didn't exist 7 years ago, but Steve Jobs thought it up, and since then how many thousands of new jobs have been created out of it's ecosystem? Programmers, managers, artists, musicians, voice actors, advertisers, accountants to do their taxes, cleaners to clean their offices, caterers to feed them. And then there's Elon Musk with his electric car and rocketry companies.
The day humanity runs out of jobs is the day we run out of ideas. And if that has happened we have bigger problems than lack of employment, because it probably means that free speech and art have all been censored/banned in the preceding years, which is why people no longer have any imagination.