If AI is wildly successful and replaces lots of jobs, fewer people will be able to purchase what AI helps produce.
In other words, the economy will shrink and the stock market will crash.
If AI is not wildly successful, a lot of high value companies will be in debt up to their eyeballs.
In other words, they will be less profitable and the stock market will crash.
The overall result is not good in either case.