What is/are your goals here - are you looking to find a happier work environment, or more personally appealing work?
Your question & comments mention that you have difficulty with high-stress/high-turnover environments. @mickeyf and several other commenters - myself included - can all attest that it is possible to find positive work environments in the software development business.
Glassdoor and other job-review sites are helpful, but you can also learn some pointed questions to ask recruiters/interviewers that may help you gain a "feel" for the workplace prior to accepting an offer. There are loads of books and articles on the subject, and it tends to be culture-sensitive, so it's hard to give specifics without knowing country/region/field/age/etc.
Certain fields within software are particularly good (or bad) in terms of turnover, autonomy, and work-life balance. My experience is that startups, game companies, and many mobile shops tend to dazzle with "cute" amenities and high signing bonuses, but are actually hard-driving workhouses. Larger, more established companies/entities with enough people to cover the work, and a broad worker base beyond tech, are better at letting you find your pace - although a crappy division/department manager can still spoil this.
As for personal appeal - what is it about legacy codebases that is putting you off? Unfortunately dealing with someone else's lousy code is often part of the job - even in software-adjacent fields, that ghost still haunts LOL. But one of the questions you can ask, or even glean from the job posting, is how much of the job entails maintaining existing code versus building something new.
It's worth taking the time to find a workplace+position that builds you up instead of grinding you down. Right now I'm making about 60% of what I could in the private sector (not including benefits, which are a significant plus). But I work with friendly, competent people, in a low-turnover environment (academia), and after initially cleaning up a legacy prototype (3-6mos), I now own the entire project (3.5yrs ongoing).
Do the research, learn the interview questions, and do a little soul-searching, and hopefully you'll find a place that suits you - and your skills.