It originally existed to give wealthy plantation owners more teeth to defend slavery from the rising opposition,
It was really even more basic than that.
Originally, the states were pretty darned sovereign. The President was not expected to meddle in domestic affairs, the elected officials of each state did that for themselves. The President was intended to represent the state legislatures, as a group, to foreign governments. Including war, if Congress declared one.
The biggest issues of the 2016 election were national healthcare, immigration, and income taxes. None of those very domestic issues even existed when the EC was designed. The Federal government had no say.
But now states are really provinces. More autonomous than in most countries, but nothing like the "States" that United to form this country.
The EC now mainly serves to keep the partisan elite in power. The legislature of nearly all states can confidently expect the voters to turn out a majority for the presidential candidate from their party. So sending EC delegates to vote for their partisan interests works for them. Pretending it's the "Will of the People" puts a veneer of democratic process on the raw partisanship that keeps the parties in power, and able to serve the economic elite who really run the US.
That's why it's so difficult to even have a reasonable discussion about the EC, much less change it.
Tom