You could avoid that by having a government with limited powers - limited enough that the voters could not use those powers to seize others' rights and property.
We had an imperfect, but still pretty good, example of that. Had. It's been eroding for a while now. But it's eroded the fastest under the current administration, which has tried very hard to overrun all the limits on power, and has succeeded far too often for me.
If you have that you are 99% of the way there.
Those anti-democratic limits are where the devil lies. I think that they can only stay intact indefinitely by having competition for governance. Part of a reason why I'm a proponent of polycentric law, so that a single monopoly of governance can't slowly crush the populace.
Once the majority realizes they can't tyrannize the minority because the minority can run away and work under their own system of law, a balance might be found. Under such a system there is no monopolistic democracy, but people might voluntarily enter into one until they find their rights too suppressed.