Yeah, that's part of the problem, or one way to view it. As you noted, when a majority of voters figure out they can vote largess for themselves from the public treasury, the system is ripe for collapse into dictatorship, or so goes the traditional cycle of governments.
But assuming the people are faithful to the design of the constitution (at this point in our history, they are not), then having the ability to enforce their will with a credible threat of violence is necessary in in order to maintain the pecking order. Once the government obtains superior firepower, IT will take over, and the will of the people will just be manipulated, and "government of the people, for the people" becomes a figment of imagination.
Elections today are used largely to facilitate preservation of the illusion of limited, constitutional government. There were "free" elections in the USSR, and in Saddam Hussein's Iraq. Freedom does not come from elections, it comes from superior force.
Government will always have “superior firepower” and a few guns will make little if any difference. What will an AK47 do against a nuclear bomb. Our largest weapons systems have hundreds or thousands of men operating them.
In point of fact, it is rare that the majority of people make the right decision. Even in times of crisis about the best you can hope for is 1/3 for, 1/3 against and 1/3 does not give a crap. We constantly skate on the edge of disaster.