> doing “janitorial” work is rewarding in that it is, um, real work.
> ... it’s really easy to have a multi decade career in tech and look back, realizing that not only is none of the code you worked on still running anywhere, but none of the companies even exist.
Precisely. I feel the same way. I wrote tonnes of Terraform code years ago at XYZ/ABC Ltd and I often think, "Who knows what that code is doing now. Who cares? Does anyone care?"
I have a few answers for you:
1. Go part-time in the tech field (contract or consult for a few hours per week) and reduce your involvement whilst capitalising on the high income
2. Produce (digital) goods that are closer to the consumer: videos, books, etc. on anything that takes your interest
3. Use your free time to do something like cleaning up your local community of trash
For (2), what I'm doing is getting back into making YouTube videos. Even then, I've fallen into a trap for weeks now. A trap of thinking: "What should the format look like? What amount of work should go into it?" And so on. In the end, I decided to turn on the web cam, record, throw the footage in Canva and do some basic editing and overlays, and publish. Quick, simple and, to get back to your point (or rather to attempt to counter it): I'll have produced something that I can see, through stats, is being observed and having a positive impact on people. That's hopefully going to help too.
For (3), go into your local community, even just your street, or a neighbouring street, and clean it. Take a thick bin bag, a pair of pinchers for picking up trash, and clean up. Do that once or twice a week, and the impact will be massive for you and everyone around you. You'll feel better for it because it's physical and "real".
It's a tough position the OP is in, but I'm getting there my self as well. I can feel it.