Programming was one of my main hobbies, I started quite early when I was about 9-10 years old, as a hobby it stayed with me until I was about 25-27, after working professionally for about 10 years.
After that I don't have the lust for programming that I had during those first 15 years. I have ideas but nowadays I also have the experience to know those ideas will demand more effort than I'm willing to commit to come to fruition, I found other things in life that fulfill me much more than sitting down and coding a solution for 1-6 months.
The remnants of programming as a hobby to me are scattered through areas I had never the chance to work professionally: embedded systems, electronics projects, DSP, and other fields which feel fresh and at the same time somewhat approachable after 20+ years of experience. I just don't work on them in any terms related to financial interests, it's purely interest based, and if the interest starts waning, and a project becomes dreadful I just abandon it for a while. If it's interesting enough I will pick it up as a hobby again at some point.
Working with electronics is a lot more joyful to me than programming yet-another-compiler, yet-another-library, yet-another-API. It gives me some connection from code to the real world, lights blinking, things moving, positions in the world becoming data, etc.
You'll only be stagnant if you stop being curious, if you stop adapting to the inevitable changes that happen in this field. Apart from that you gotta find the things that give you joy, not necessarily glory, or even to not be "mediocre" as if everyone is bound to something great.
Just don't stop caring completely because from my career that's when I see programmers really going down the spiral of not only mediocrity but also leaving a trail of issues in their wake for others to fix...