Earlier quoted context omitted.
Republic and democracy refer to two different axis. Republic is about how the vertex of government is structured. Democracy is about where the executive/legislative power comes from. The US is both, you could argue that Canada is not a republic as they have a recognized queen, but it would be a stretch as she has essentially zero power there.
They said they elect their leaders democratically which is simply not true no matter how you want to phrase it. The president is elected by an electoral college and not a democratic vote.
The electoral college is an abstraction so that the states in the United States are able to have a check and balance on federal power. Having a direct democracy of 300 million people would be a bad idea, a lot of political philosophy has been written on why.
If you build on a library that builds on library using AGPL license, you are still bound by the AGPL license, no matter how abstracted. If your country ultimately derives for the people, you are democratic. It is just that the USA is technically a democratic Republic, and intentionally so.