Probably, yes. The idea is that people should have adequate representation. If 45% of your area if X, and 55% is Y, and it's a direct election, then you end up with all elected officials being Y, and X has no representation at all. The ideal districts would result in 45% of all elected representatives being X.
The electoral college is based on population, but indirectly. The way you could get around it is if states awarded electoral votes proportionately to the votes a candidate received, rather than winner-takes-all. But states have to choose to do that themselves; the fed. gov't can't mandate it. Some states are already doing that.
...But the electoral college is population based. That's why California has 55 delegates, and Wyoming has 3. Slaves have nothing to do with it now.
The issue is that most states do a 'winner takes all' approach. If, for instance, Texas voted 49.9% Democratic, and 50.1% Republican, then all of their 38 delegates would be pledged to the Republican nominee (...and the state legislature would pass laws restricting the ability of Democrats to vote). That was how Trump won in 2016, despite not winning the popular vote. OTOH, Biden won the popular vote by a comfortable margin, 51% to 47%, but won the electoral vote by a larger 56% to 44% margin.