Representatives are chosen directly by the voters of their districts and senators directly by the voters of their state. Electors are selected however their state decides, so yeah, the president isn't necessarily democratically chosen. Neither are judges. In practice though the electors are chosen based on the state vote. Saying the us wasn't a democracy is narrowing the definition of democracy quite a bit.