Democracy is literally just double counting to the nth degree. If a million people all have the same opinion that is still one opinion and those million people might as well be the same person. If you could re-weight things according to this principle maybe democracy would work.
There is probably a perfectly rational way to redesign democracy so that it works. Epistocratic conceits only get halfway there. The problem isn't entirely one of intelligence, though intelligence makes for better measurements. It's firstly a problem of actually measuring at all.