Absolutely! Robert C. Martin (Uncle Bob) also has this view, and I think it's much more true than the "once you hit 40 you get forced out of engineering and into management" meme.
Older people have a hard time keeping up with young guns who sit on their spare time however. You usually have family, kids, less energy etc as a 40 year old. Experience is good but I've found that it's impossible to know new things as well as young people since you have a life outside work.
According to jetbrains survey, 85% of developers work on weekends.
Dont forget the evenings and days of.
All the young people I know are frittering away their evenings and weekends drinking and going to festivals. The idea that they are poring studiously over some machine learning textbook is pretty laughable.