For the ends justify the means part, each time China went through a major revolutionary attempt in the last 150 years or so it led to incredible amounts of human suffering (on the orders of millions to tens of millions of deaths each time) and blatant foreign exploitation of their country, and some of those revolutions were for dumber things than a call to democracy (I find the Taiping Heavenly Kingdom to be particularly interesting, where a guy who thought he was a literal descendent of Jesus Christ caused a rebellion that lead to the deaths of possibly around 20 million people). I could see why they would want to take extreme measures to maintain stability, especially given how difficult it was to maintain China as a unified country that could stand up against western imperialist exploitation. Once again, not saying it’s moral nor that there wasn’t some amount of a selfish attempt to maintain control, but it’s not so black and white, especially in a society with such a strongly collectivist mentality like China; and arguably, unified control in fact was the primary deficit in Chinese government and primary cause of social instability in China since the days of the Qing Dynasty.
As for alternatives, I have no good alternatives, but what I can say is that while people from the USA decry authoritarian rule as being 100% evil, it’s hard to ignore how efficiently it has been working in the Chinese case. In a developing country being inefficient at developing has real human consequences, prolonging disease, hunger, malnutrition, undereducation, and lack of opportunity for incredibly large numbers of people. So I don’t believe that opting for a maximally representative but likely significantly less efficient form of government is necessarily a good choice for all countries, which seems to be the subtext of many people who draw a hard line on the Chinese government’s misdeeds, and proceed to label it as uniformly detestable, without considering the potential human cost of its alternatives. As for whether installing a democratic government at that point in China’s history would have been successful or even possible at that time would have been a huge uncertainty, even with what we know today.