This is somewhat misleading — the 3/5ths Compromise was used to protect the interest of slave states. That language was provided in Article I Section II. It is important to note that we have modified the definition of population for the sake of the House of Representatives many times and continue to debate it to this day. The Electoral College, on the other hand, was defined in a different part of the Constitution — Article II Section I. It was about extending the Great Compromise to the Executive Branch and preventing demagoguery (a first hand explanation is provided in the Federalist Papers).
The electoral college may have later been “justified” with other rhetoric about the idiosyncrasies of the American system of government, but here’s what Madison, a proponent of using a popular vote to elect the president, had to say:
There was one difficulty however of a serious nature attending an immediate choice by the people. The right of suffrage was much more diffusive in the Northern than the Southern States; and the latter could have no influence in the election on the score of Negroes. The substitution of electors obviated this difficulty and seemed on the whole to be liable to the fewest objections.
It seems clear to me that this was never about granting a privileged elite some sort of check against a demagogue coming to power (itself an anti-democratic notion, it should be noted), but was always about placating the Southern states such that they would bring their asses to the table, sit down, and ratify the Constitution.
The Southern states agreed to the Three-Fifths Compromise as the basis for determining each state’s representation in the House of Representatives. When it came time to hammer out the details of how the president was to be selected, they essentially agreed to apply the same calculus. Clearly, since black people could not even cast 3/5 of a vote, an electoral device was needed to apply the Three-Fifths Compromise to the presidential vote, and the electoral college is precisely this device.
If you want to argue it had other rationales for being implemented, that’s fine, but I think the reality is as Madison paints it — it was what had to be conceded to the Southern states to get past their objections so they would play ball. In short, slavery brought us the electoral college, and I think it most definitely is a case of whitewashing to suggest it was the product of some high-minded check against the electorate voting itself into oblivion by choosing a terrible president.