AI and the "end of humanity". Explain please?

We are getting into Frederik Pohl territory here. In the '50s he had several stories where the problem was that machines produced things so quickly that it was the obligation of people to not work, but consume. The dilemma was resolved (70 year old spoiler) by them having the machines consume also.
I don’t remember if he considered resource constraints.
But it shows the problem - increased productivity is useless unless there are enough consumers who have the time to consume and the money to consume. There are stores already where you can buy the stuff that doesn’t get sold at Costco, etc., maybe that is the growth industry.

Much of the increase in productivity in recent years has been in services and intellectual property. The productivity increases needed by be having medical and other care services for an increasingly greying population as much as making as much stuff with fewer workers available.

Medical and care services are two of the few areas where increased employment is expected. Alas, care service workers are not adequately compensated.
One more scary thing. In IEEE Spectrum almost every issue has an article about the latest and greatest humanoid robot. We’re not all that close to one who could provide support services, but even those jobs are at risk.
We’re already worried about people depending on AI instead of people for social interaction, but when the robots get good enough to be sexbots, even the oldest profession might be at risk.

See also

Related thread.