There’s the electoral college which was set up deliberately as an antidemocratic measure by the founding fathers. More so than it is now. But we haven’t gotten to that stage of the season yet.
Right now we’re in the primaries, which is an entirely ad-hoc system made up on a party by party, state by state basis. Each state decides when the primaries happen and what form of election they will be. Each party decides how those results will be counted in their own convention. There’s little to no federal regulation regarding the primary process. The end result is a year long spectacle.
Of course this season we’re being denied the spectacle for a shitty rerun.
There really was no illusions made when it was first set up. It was explicitly stated that even common land owners were not to be democratically trusted. The illusions come later as the system is reformed and the antidemocratic measures were wallpapered over.