The thing people always overlook is that these legacy systems are only still running because they’re super important. Nobody’s hiring a junior COBOL dev to maintain NORAD, and hopefully nobody’s contemplating putting ChatGPT in charge either.
The move if you want this kind of job is to learn a language that’s not quite a dinosaur yet, and have 20 years experience in 20 years. Perl or PHP maybe.