I don't agree. Plenty of dictators have been voted into power
Not really in free and fair elections.
and dictators and democratically elected representatives both need public support.
Yes and no. There's actual
support, then there's
not opposing them. For a leader, simply having people not oppose them can be enough, so long as key people support them.
those who allow some kind of sham voting always make sure they control the means of communication
One of the reasons they allow sham voting is that it reminds their key supporters they're replaceable. A certain amount of social mobility is necessary in any society to make people support that society; people will put up with a pretty awful life if there's even a small hope of it changing.
Imperial China had the civil service exam, in theory anyone could do it and get a job for life, in practice it was the sons of artisans and merchants who had the money to pay for a tutor. Still, every town of any size had a bunch of kids visible going off to school, and some of them after doing the exam went off to the capital and sent money back home. From the late 18th century, though, fewer and fewer family names appeared on the roll - graduates were slipping advanced copies to nephews back home, etc. One day a young man failed the exam, went to Hong Kong and had a nervous breakdown - and while there listened to a German preacher and became convinced he was the brother of Jesus, and ended up leading a rebellion preaching all property in common, etc - the Taiping Rebellion, the bloodiest war in human history until WWII.
A lack of social mobility in a system makes people want to change the system. Sham voting is a process where the commoners can enter the rubber-stamp parliament, which while it has no power as a parliament setting policies for government, the members are all connected to the senior bureaucrats and businesspeople and Generals and so on. So if you want to build a block of apartments or get your son a commission in the army or be able to dump some toxic soil near a school, that member of the People's Grand Parliament is the guy you speak to. They don't have legislative power, but they certainly have the power to get things done.
Every election, some of those guys leave the parliament and some new ones enter it. And some of those who leave the parliament go to the politburo and work with the Dear Leader. And some of the politburo drop out and back into the parliament, etc.
This is, by the by, one of the reasons for regular purges in communist and fascist systems of government, and for kings in the middle ages to go around lopping off the heads of a few nobles - purges create job vacancies, social mobility. Everyone thinks purges are just about fear, and of course they're about fear - but purges create hope. As wikipedia notes,
"The purge of the Red Army and Military Maritime Fleet removed three of five marshals (then equivalent to four-star generals), 13 of 15 army commanders (then equivalent to three-star generals), eight of nine admirals (the purge fell heavily on the Navy, who were suspected of exploiting their opportunities for foreign contacts), 50 of 57 army corps commanders, 154 out of 186 division commanders, 16 of 16 army commissars, and 25 of 28 army corps commissars."which is to say, Stalin created 269 job vacancies in the senior ranks. That's 269 people who became Generals and Admirals, which also means that 269
others went into their old positions, and so on down the chain of command all the way to some privates becoming corporals. One of the reasons wartime sees such loyalty to The Leader is that all the deaths of commanders create lots of opportunities for promotion, and of course the rapid expansion of the military creates a lot of new positions, too.
Wars are
great for social mobility, which is why many failing systems - like Soviet communism, or modern American capitalism - are so keen on starting wars. Peace would mean no promotions, and in fact a lot of retirements.
The more long-lasting systems find more peaceful ways to do it, like the DPRK's elections. One of the reasons people stopped supporting the Soviet Union was that the same group of 20-30 old guys were running things for decades, and they were mostly at peace - the Afghan war wasn't big enough to kill a lot of senior officers or require an expansion of the military. Without genuine elections or purges or wars to create social mobility, nobody had hopes of change any more, so they lost interest.
But the will of the governed? That's only a feature of democracies insofar as they tend to be more transparent and allow freer discourse.
It's more like this. Let's suppose I am the leader of a city of 100,000 people, each of whom provides me with $1,000 revenue on average, for $100 million in all. What do I do with this money?
Now, if they are all disarmed except for my 100-man Imperial Guard, I can give each of my Imperial Guard $500,000 - for half a million each I can find 1 man willing to shoot the other 999 unarmed protesters if he has some company. I just need to look after those 100 men really well and I can rule the other 99,900, and keep $50 million for myself.
But if I need 50,001 of them to vote for me, giving them $1,000 back isn't going to impress them much, so I can't keep that $50 million spare, I have to give all $100 million back - $2,000 each. Those 50,001 people are only $1,000 better off, though, that may not be enough to convince them, especially if they have to trudge along dirt roads and pay for a tutor for their kids and pay doctors and so on out of that. So instead I take that $100 million and spend it on roads and schools and medical clinics. This also doesn't guarantee support but at least after tossing me out at the next election they speak well of me and I might be able to get back in at some later time.
Which is to say, increasing the franchise tends to work to encourage leaders to consider the overall public good more.
This then explains why leaders do things like gerrymandering and voter suppression - if I could get in with just 10,000 of the right voters, I could give them $5,000 each, keep $50 million for myself and still get in. It also explains why opposition parties are against gerrymandering and voter suppression - they just have to get 10,001 people who don't normally vote to get out there and they're in. But of course, once they're in they become less keen on it.
So it's not that dictators can ignore public opinion or whatever. It's that people support you if you reward them, and don't if you don't. The more people whose support you need to get and stay in power, the more likely you are to do things for the public good - not out of altruism, but out of your own self-interest in staying in power.
Longer-term, you need to offer some small hope, at least, of social mobility. That's why Oceania in
1984 had the lottery for the proles, but it's also why it had O'Brien doing purges.
It's no coincidence that decades of stagnant growth for the waged class in the US, combined with people bribing their way into unis, etc, gets you civil unrest. Nor is it a coincidence that the US is involved in Forever Wars. Drumpf pulled out of the Forever Wars so that's why he had to put in tariffs etc, rebuild manufacturing jobs and give the proles some hope. If Biden wants to bin the tariffs he'll have to go to war instead. It's either that or people lose interest in supporting the system and the US goes the way of the SU.