It did not happen because of sudden productivity increase that put too many people out of work. No economic crises ever happened that way, and there is no reason to believe any will. This is what every economy strives to achieve and it's kinda stupid to be afraid of it. Some people can be hit hard, and it always happens during every technological revolution, but with sufficient investment into predictive policing and law enforcement overall, this is a manageable risk.
Surely, a stock market shock can happen other way around - if AI will turn out to be a flop - but i believe this is not the risk you are talking about.