don't think that the white collar layoffs of the last 3-4 years are due to AI. The tech layoffs of 2022 are explained in part by the impact of 2017 tax reform. Before 2022, the research and development expenses could be written off taxes as a tax credit in the same year. It's a dollar to dollar reduction of tax liability. Tech companies classify a lot of their work as R&D. So those overpaid Facebook coders are essentially public charges!
Somebody up thread said that programmers are disproportionately highly compensated in the US. They are, because it's not companies who pay for them, it's taxpayers, indirectly.
Starting 2022, the deal became a bit less sweet. R&D expenses had to be amortized over 5 years.
What happened next is a collusion in response to Great Resignation. Several large tech companies conspired to have layoffs at the same time as a salary compression move.
The AI statements are mostly a scare tactic to put pressure on employees. For some industries and applications AI is revolutionary, but for coding it's good at autocomplete and not much else.