These are issues he may battle his entire adult life, if my own experience is any indication. I see similar in my now adult children. Depression could be involved, ADHD ... hard to say. It seems to me to be more spectrum adjacent than a clear symptom of ASD. Regardless, I've found I need to change things up constantly, as well keep my workload on the low side, in order to stay on course. I can't just do and repeat for year after year after year. The joy and the challenge goes out of it, and I can't stay focused without those hooks.
There are many different ways to change things up. Get a different job, adjust work day habits, add new exercise routines, etc. The goal is to find a spark that can feed the soul, give new energy.
For years switching jobs was how I kept up the spark (it also built up my prestige in my field). Unfortunately, as I near retirement, I've had reason to stay settled in one job. It's been difficult. I max out after 5-7 years. So I've tried changing up routines, work locations, and exercise, but they all have their downsides, as well. It's a constant process.
_________________
Mom to an amazing young adult AS son, plus an also amazing non-AS daughter. Most likely part of the "Broader Autism Phenotype" (some traits).