> How does evolution not get stuck in a local optimum?
Could be wrong, but my understanding is that it does? Plenty of things in nature are not really evolving much at all (as in, variations are not selected) even over longer periods of time. What can happen to it is getting removed by something that evolved from somewhere else (taking the evolutionary niche, or making it unsurvivable)