This website contains age-restricted materials including nudity and explicit depictions of sexual activity.
By entering, you affirm that you are at least 18 years of age or the age of majority in the jurisdiction you are accessing the website from and you consent to viewing sexually explicit content.
You’re thinking of the 3/5ths compromise, which is a separate though related thing to the Electoral College.
The EC tended to favor non-plantation slavery states (only Maine and Massachusetts had zero slaves at the time, though several others were close to zero). Virginia was by far the biggest state by population, and it had tons of slaves. Without counting its slave population, it would still have been the largest. The Electoral College, at least at the time, favored small, relatively slave-free states like Rhode Island and Vermont. The 3/5ths compromise does give some extra power to the larger slave states in the EC by way of added population, but not proportionate to what small states get out of it.
Federalist 68 gives the official reasoning behind the EC:
In other words, the EC existed precisely to stop someone like Donald Trump from taking office. Or more accurately, stopping a populist, corrupt nitwit was the reason it was justified to the American people at the time. Back then, they were trying to head off criticism of democracy from supporters of constitutional monarchy. That is, democracy would be vulnerable to takeover by a populist, corrupt nitwit.
Obviously, it has failed at its one job. That doesn’t mean democracy itself is vulnerable. On the contrary, the EC is a specifically anti-democratic concept that has been abused by exactly the sort of populist, corrupt nitwit it was supposed to guard against.