First, as I said before, when the CIA targets socialist leaders, only the strongmen survive. It's my belief that strongmen are not great leaders, they're just the best at not getting killed. This is why people associate "socialist" with "authoritarian", because the crunchy, hippy Bernie Sanders types get shot and their supporters get thrown from helicopters.
Second, killing socialist leaders isn't the only thing the CIA does. Look up any CIA counter-revolution manual and part of their cointel is to do as much as possible to destabilize the politics and economy of the country. Any socialist leader (or even just mildly social democratic leader) has to contend with this in a way that a capitalist leader doesn't. Even under these circumstances, we still have relative success stories like Cuba, which while not great from a first world perspective is a much better place to be an average citizen than Haiti or Dominican Republic. Or Bolivia, which got coup'd but popular support was able to oust Añez and whose economic reforms have increased GDP per Capita by 50%.
You can't state something as definitive as "socialism doesn't work" when history includes the greatest empire the world has ever known doing everything in its power to crush it.