Yes, "pure-democracy" and/or "populist" politics has worked out so well in the 20th Century. More than 50% of a group of people doesn't like (or is convinced they don't like) something or someone for whatever reason, hmmm, I think that's how people end up in ovens.
We have a democratic-republic in the United States so popular / populist majorities can't inflict absolute will over unpopular / unpopulist people / regions.
Populists today, at least in the US, aren't as dangerous as they are / were in countries where changing the constitution is much easier for a powerful / popular leader.
Government always derives its powers from the consent of the governed, no matter what system is in place. If the mass of the populace wants to break a group badly enough, they'll do what it takes to see that group broken no matter what the constitutional form of government allows. All you can hope is that you have a system that's good enough at keeping that barrier sufficiently high that you essentially need a supermajority of enemies before that happens to anyone in particular. The American system has done a semi-good job at it even though there have been several major oversights (African slavery, Mormon persecution, Japanese internment, etc).
what if the computer decides there is no way to feed the population at the current (or a future) growth rate and implements a mandatory two children only policy?
a computer wouldn't understand tact, politics or empathy, or if it would, it wouldn't be a solution much better than what we'd get now.
It may also decide that it's necessary to reduce the population by implementing social purging, starting with the people who disagree with this decision.
Purge everyone who doesn't agree with the purge.
150 milliseconds later, law-enforcement drones and robots start executing.
We have a democratic-republic in the United States so popular / populist majorities can't inflict absolute will over unpopular / unpopulist people / regions.
Populists today, at least in the US, aren't as dangerous as they are / were in countries where changing the constitution is much easier for a powerful / popular leader.