First, ecosystems don't work on this concept of "balance" or "problems to fix". There are ecological niches that are exploited by a species or not. We have both generalists and specialists, predators that will eat anything and predators that have specialized in a particular prey or hunting approach. The world is full of organisms with remarkably complex behaviors, the field of evolutionary biology would collapse if this sort of behavior disproved it.
Second, there's really nothing hand-wavy about how specialized behaviors evolve, and in fact there is a mountain of research in the fields of evolutionary biology and behavioral ecology that have significant explanatory power here. I would argue that you're the one being hand-wavy saying "I don't think a simple gradient descent...". Evolution is not a simple gradient descent, and no evolutionary biologist would ever argue that it is.
An interesting illustration of this might be variety seen in dogs, which are still one species that can reproduce together.
Presumably there was some ur-mutt, where almost all the variations we see today were already there, latent, until humans nudged the balances and blends.
Attempts to systematically domesticate foxes [0] suggest that certain packages of physical traits come along with selecting for calm or friendly behavior.
https://www.pbs.org/newshour/science/domesticated-foxes-gene...
I think this is a case where the theory of evolution feels pretty handy-wavy and doesn't answer the mechanism of how this happens. The article even talks about "bioengineered" silk! There are certainly lots of cases of evolution, so it is clear that things do evolve, but the problems of a theory are revealed in the edge cases, and I think this spider suggests that the theory really needs a lot of work to be a robust theory. I don't think a simple gradient descent (evolving toward more fitness) has explanatory power in this case. A theory that hand-waved around edge cases like this would never fly in Physics; at best it would be considered a holding theory until a better one could be found, like dark matter.
(Plus, I think it's fun to think about bioengineering in a sci-fi, or even Babylon 5 way)