"The flaw in your analogy is your claim that "at least half of shoppers" don't return their shopping carts. If I were to go to a store and look around, I would likely see the majority of shopping carts put in the proper location after they are used, because that's what I nearly always see..."
perhaps you forgot to give credit to the workers who's job it is to locate abandoned and lost shopping carts to neatly return them for your usage. The order of the shopping carts required enforcement.
"While it's true that a pure democracy is essentially a system where the majority rules, if the majority of the people in that country share values and goals which are beneficial to the greater society and minority groups as well, then that society can function pretty well..."
Problem is, democracy lives on borrowed time, the values of the people fracture and tribalism grows until the nation is destroyed (See the USA for example)
racism for example is a product of tribalism within society, especially when the nation is less humongous.
Just because the people who start democracies are homogenous, doesn't mean their decedents will be. This is how America is tearing itself apart, and this is why you will loose, have lost and will continue to fail your allies and sever ties through your countries greed-driven exploits in foreign affairs. Imperialism seeks integration where your democracies seek theft.