I'm curious - how do you explain the fact that as you look all around you, lesser number of devs are having fun?
Maybe you are thinking of programming at work. If so it might be legitimate but that's not what they addressed, they didn't say programming at work is fun.
Because for a lot of millenials and older developers coding/making thing by hand was the fun part. The endless meetings, scrum rituals, code reviews etc were the annoying parts of the job.
Now they took away coding by hand, so what's there to enjoy? In a field that was already sensitive to burn out and churn taking the joy from the daily routine doesn't help with that.
Only thing you can do is get in build something for 2 years hope you got bought by big tech before the pile of slop code collapses on itself.
It has less to do with the devs having fun at their job and more to do with if they'll even wake up to go to their job tomorrow. Layoffs are never fun.
Because their job stopped, to a large degree, involving programming.