OP is correct
Most things are both predator and prey, a wasp that eats flies is clearly dumber than a frog that gets eaten by a snake for between the two the predator-prey relationship is reversed
Elephants have no natural predators and not much is smarter than them; pigs and deer are less intelligent than the wolves and tigers that eat them, rabbits and mice are less intelligent than the foxes and owls that eat them, flies and mosquitoes are less intelligent than the bats and lizards that eat them and so on down the line