I think that hits a lot of it. And while "mainframe" (really IBM z/OS, z/VM, CICS, etc. in this context) is probably the most prominent example, the same applies to a lot of other "legacy" computing like MUMPS, ADA, IBM i, other mainframes and minicomputers still in use, etc. Collectively, there's still a lot of that sort of thing but it's essentially all proprietary and there's not much in the way of community except informally though, in many cases, there are still user groups, etc.
I know a bunch of MUMPS folks too and yes, it's a very similar vibe. Ditto with other "niche" tech communities. Some people just really like those little pockets outside of the mainstream. One of my mainframe friends frequently posts pictures of RL gatherings of that community where he is, and it definitely seems like a good scene to be in. If I ever had to un-retire, it might well be into something like that.
It's not the sort of thing I'd really recommend a young person to get into. I've seen people who were basically world experts on $LEGACY_THING as interest in said thing declined to zero and it wasn't pretty. But there are also some fairly large niches and they're probably a comfortable enough place for a veteran to coast late career.