There are a lot of tangential career paths you can take with a background in engineering.
As a case study of one, I transitioned from engineer to being a technical writer last year. I now run a small agency, but I could have stayed employed in the field just as easily.
The money isn't quite as lucrative as in software engineering, but it's very livable, unlike many forms of writing.
You also don't have to limit yourself to dry documentation. Companies hire technical writers to do blog posts, case studies, and even marketing copy for technical products.
I've also had friends transition into fields like product management and network security, which might also be a nice change of pace. I wrote more about this here: https://www.freecodecamp.org/news/alternative-career-paths/