I've been in this field for 15 years. So I already feel like I dinosaur. The trajectory of the market tells me I probably cannot last another 10.
To those who say, "it's even harder now to find good developers", to me that means the answer is Yes.
However, as hyped up as the tech industry is, I'm not sure how many people stick to being a web dev long term.
I've noticed a lot of people will gravitate towards management, but the reality is that companies need people with boots on the ground.
If anything, I would guess that we'll have an over saturated market of managers, and not enough people that truly know what they're doing tech-wise.
Been doing this on and off for 25+ years now, and I looooooooove how much easier and user-centric it is now with loaded frameworks like Next.js, UI frameworks like MUI, design tools like Figma, etc. To me it feels like we're just starting to approach the actual potential of the frontend, where enough "primitives" (as in low-level components, infrastructure, design patterns, etc.) are mature enough such that you can actually focus your time on user needs and stories instead of fighting the technology. Combine that with serverless functions and headless backends and you can make a full-stack website without dedicated backend work. It is a huuuuuuuuuge change from the bad old PHP days.
For me HTML, barely-stateful JS and CSS are mostly what still pay the bills as always, but it's exciting to occasionally get to play with Canvas, WebGL, Leaflet, and OpenLayers sometimes. There's a lot of fun stuff to tackle in other industries (I work in solar/clean energy, for example) once you're out of pure tech.
I don't work for these guys, but I envy their devs who get to work on complex web frontends like this: https://www.opensolar.com/
TLDR if you're willing to spread your horizons a little, look outside the tech industry for fun opportunities!