This assumes a naive system without a constitution. If you start with a solid set of rules that say they can only be changed by reaching a certain threshold, e.g. 80% of the population and specific timeframes for votes, it will be much harder for populists to push through evil.
You could also have a weight system, e.g. engineers get double votes on technical issues in their field. This will lower the power of redneckish factions.
You could also have a weight system, e.g. engineers get double votes on technical issues in their field. This will lower the power of redneckish factions.