Much like any political system you can imagine, a democratic system requires a complex web of rules and regulations to function properly. For one, so-called democracies always require more specification. Are you talking about direct democracy? Are you talking about deliberative democracy? Are you talking about representative democracy?
Democracy does not mean, by the way, the "rule of the majority" because "demos" does not mean majority but people. And for the common people to rule you need a system to encompass it. Of course, over time there have been a lot of criticism and a lot of work done in deciding which rules and which structures are the most appropriate to make the necessary compromises for our political systems to work.
To put things on perspective, in Switzerland for example they have decided that the will of the swiss people is above international treaties. And this does pose a problem, for example there was a referendum a couple years back for the banning of face covering; a policy which affects everyone, yes, but affects most a particular group (muslim women). But in most cases, swiss people have a very full participatory democracy and their political system is incredibly stable. It's not perfect, and a lot of experts in the field consider countries should never be above international treaties such as the human rights treaty that most countries have signed.
When you say "we are stuck relying on the intelligence and wisdom of the masses" you're making a pro-elitism argument. In that the masses ought to be ruled by people better than the masses; and in many ways, this is the approach countries like China have taken. To me, a big problem with this approach comes from the ego of individuals. Is it really possible to change someone's mind who happens to be in a position of power such as that? Is it easy? Personally I believe this to be a much more dangerous prospect. A good example of this can be seen, I think, in Meta (the company) where Zuckerberg is pretty much destroying the company and everyone but him can see it. Yes, this man build the company, but does that expertise translate to every future challenge? It is why we tend to prefer collective decision making, usually smaller bodies, but could there be space to make better use of bigger collectives? I think so.
So in short, I think you should probably read a little more about political philosophy to be able to say something as big as "Democracy is incompatible with freedom". It's a pretty big statement.