I think the risk of using the stock market as retirement fund is broader than AI.
The stock market and mainly ETFs work if people keep pumping money into it. My (unresearched) fear is people pulling money out to retire will trigger a cascade and crash the market