The communism collapsed because it was no longer possible to keep the knowledge of the 80s American supermarket hidden from them. That's it. If the communist regime provided what CCP does now - there would be absolutely no collapse.
(Sometimes you'd have the arrangement where there's token opposition that is similarly nominated, much like DPRK today.)
As for people going to vote, that was actually enforced. While there was no law about it, strictly speaking, not going to vote would likely earn you a reprimand at work.