A young engineer must know that getting stuck on a legacy project is a career-limiting move. Happened to me when I got stuck on a old Ada codebase for a legacy aerospace system (unemployed in 2008, you take whatever job you can get), and it took years, and a good chunk of my spare time doing projects/studying, to find a company willing to give me a chance working on something modern again.
Now, someday when I'm in my 60s/70s, and you have some legacy system written in some defunct language nobody under the age of 50 has any experience with, sure, I'll do it. But it'll cost you.