“Intelligence” isn’t synonymous with “evolutionary fitness.” There are plenty of reasons why the genes of a more intelligent species might have had less reproductive success than the genes of a less intelligent species.
Indeed, I think Steven Jay Gould said that the jury is still out on whether intelligence has proved a successful trait for humans, given that we have been around for barely eye blink on evolutionary time scales.