Insect brains are indeed miracles of scaling and situational reuse.
Primates have our own interesting mutation on that front: Normally cell size scales with body size - an elephant's cells are far larger than a mouse's, including it's neurons. So brain-to-body size ratio provides a reasonable first-order approximation of intelligence across species.
Primates though have evolved roughly constant-size neurons, so that large primates have far more neurons than small ones, even when the brain-to-body size ratio is the same. It's only the size of the brain itself that matters for determining potential intelligence. And humans are about as intelligent as one would expect a primate to be based on our brain size.
Of course that also means that brain-to-body size ratios are utterly useless for comparing intelligence between primates and other species.