“…how do I get my mojo back and get that level of technical excellence back?”
You decouple your day job from your need for technical excellence.
You do something on the side. Maybe a pet project. Perhaps a little service work for customers you find. Contribute to an open source project. Or best of all, start your own business.
This is what I did and it changed everything. I have never complained about the lack of stimulation of any day job I have had (well maybe just a little). Better yet, I have used to crappiness I encountered during the day to push myself to “never do that” at night.
The day job is comprised of quality right in the middle of the bell curve and it’s good enough to pay the bills. The side work gives me a chance to push all the way out to the right hand side of the bell curve with cool stuff.
The ultimate plan is for the side work to take over and make working on someone else’s crap during the day unnecessary. Give it a shot.