So far, we've been pretty good at identifying where capitalism just doesn't work and then bandaiding that area with legislation.
For example, capitalism has no solution for disability. In a capitalist system, everyone must work. Those who don't work should, then, be filtered out - die.
But that's obviously bad, so bandaid - SSI. We say, if you're disabled, we'll give you little socialism, so you don't die. We'll put a communal responsibility on keeping you alive because that's what's most beneficial for society.
There's no rule anywhere saying we have to just let AI make the world a worse place. No, WE decide that, even in a capitalist system.