The taliban came to power by stopping socialist massacres, most famously in a "torture prison" the socialists built. That is what made people choose their side. They killed less people in open warfare than socialist revolutionaries did in peacetime, and much less than the Soviets did when "helping the socialist revolution spread".
Despite what happened since, sadly, I think you'll agree things never got as bad in Afghanistan as they did during the socialist revolution they had there. Not even now.
Well not intentionally engineered by the CIA, but definitely the result of their engineering. Much like the rise to power of our brave allies the Afghani mujahideen, and many others…
The revolution was a quarter of a century after the Shah came to power. It is a bit silly to state counterfactuals over such a long period in such an unstable and violent region. The Shah's reign was pretty popular during the first decade, it went quickly downhill after that. Mossadegh was only prime minister for 2 years. Two extrapolate in any way from this is ridiculous.