I'm actually thinking of switching into video editing career slowly, just as a backup for my current programming profession. The reason is I'm not sure whether I can survive as a competitive programmer in my late 30s and also I think I kind of like editing.
I went up the management chain for a while (startup CTO, etc.), and it kind of burned. Switched back to dev for a larger (200 headcount) e-commerce.
My experience is valued very, very highly. I look at designs from younger developers and help them shape it a bit, and it's normally appreciated. I am willing to bet I am a better developer now at 38 than I was at 28. I expect to be better still at 48.
The "young people are smarter" thing is a myth. This is not a competitive sport built out of hours worked: it's about being able to write good code, and that takes experience and practice. Keep crafting, good luck.