As I mentioned in my post, the real brains behind the coup were the UK. The US took quite some convincing to actually go along with it.
And of course Mossadegh was not a democrat. But he seemed to be genuinely popular (especially in the cities), and I would bet my right arm that the UK did not give a fig that he was a wannabe dictator: had Mossadegh not touched the oil concessions that the UK had, the UK would have left him alone. They cared not for the Iranian population, and I guess they never did.
I am convinced that the UK acted and convinced the US to help them because of the nationalization of the British oil companies operating in Iran with concessions that would have been valid until 1993, and that they didn’t care whether Mossadegh was a democrat or a tyrant; only that he dared fuck with the British oil companies.
That does not make Mossadegh a hero or a martyr. He makes him the target of an UK that was really angry at the loss of the Iranian oil. Other considerations (that Mossadegh was not a democratic leader) were not relevant for the UK at the time.