There's an element of contingency to all this. The Tiananmen protests really *did* seriously threaten the CCP's rule on power. There were open splits, with some in the army mutinying, party leaders and local cadres expressing sympathy or joining the protests, unions nearly calling a general strike, etc.
It didn't succeed because the regime was able to crack down at the right moment. But it was a nearer-run thing than many remember now. Had Deng and the hardliners hesitated by even a few weeks, they could well have been overtaken by events. There were moves afoot internally to oust Deng, and had a general strike broken out and had the army refused orders to crack down, it could well have escalated.
Now, whether a post-Tiananmen regime turns out democratic is a harder question. Even though free elections weren't actually the main demand by protesters, it's very easy to see that a post-Deng regime - and the logic of revolution - leading to a political liberalization and elections by 1990 or '91. But whether that regime could consolidate is an open question. Quite possible that Zhao Ziyang ends up as China's Yeltsin and it lapses back into kind of an authoritarian Putin-like state.