Yeah I also get this feeling that a lot of junior devs decide they don't really want to do it anymore. It's hard to get numbers on it because they will still have a related job title.
Almost 30 years ago I was a freshman cs student and a prof rolled out data that said by the time we were 30 years old, most if us would have already left the field. I can tell you that almost no one I graduated with is still working in tech, and not because we retired early off stock. It’s a challenging field for so many reasons.
Based on my own experience, I don't find it hard to believe that so many want out, but I do find it hard to believe that so many get out and so quickly. These days I find myself wishing I had gone the route of physician's assistant so I could do some tangible, socially-needed work that still pays the bills.
I've actually ended up in a tech job that hits those a bit, so I am doing a bit better these days at least.
It would be interesting to see how that compares with other professions. Do carpenters or dentists leave for other fields at the same rate? How about other types of engineers?
I can only speak of my experience having gone to school for Architecture. They told us that with each recession, the profession loses a generation of Architects. I was wrapping up grad school just before the Great Recession, and professors were surprised that a relatively greater percentage of graduates had stayed in the field due to continued economic prosperity since the mid 90s and the dot com boom hadn't impacted the Architecture field all that much.
Of course, once the Great Recession hit, myself and many others that I graduated with either left the profession for other employment or simply never found jobs to begin with (that was me). Luckily I was already programming in grad school, and what was something I was filling my time with while looking for an architecture job became a new profession and I never looked back. Given all the comparative benefits of Software Engineering over Architecture, it's been a good move for me.
Yeah, for the whole my career in tech, except the first year I had such feeling. Don't want to do it but couldn't leave this golden cage of enterprise bulshit development.