But that doesn't mean that the electoral system isn't deeply flawed. It's a system unworthy of a country that considers itself a democracy.
Agreed that it’s flawed. Its effect is to ‘disappear’ minority votes on a per-state basis. There was an attempt to get rid of it in 69 or 70 (Birch Bayh), stopped by a Senate filibuster by Southern Democrats, who were interested in suppressing the Black vote.
However, the EC per se does not lead to a two party system — you can blame our ‘winner gets all’ system for that. If you’re interested in more than two parties, look at ‘ranked choice voting’, a system in which a voter can vote for a third party candidate without fearing their preferences would be ‘thrown away’ because that candidate was unlikely to win. The best example of this working is Senator Murkowski’s freedom to consider leaving the Republican party — Alaska has ranked choice voting, so she’d be able to run successfully in future elections as an Independent — or as member of a third party.