Taking a flailing org and being visibly a part of turning them around will open a lot of doors in your current company. Notably those open doors won’t really translate if you switch jobs. If you switch jobs you’ll have to rebuild the trust that senior middle-management have in you.
At the end of the day if you want to find a small niche and stay in it then senior staff+ is likely not for you unless your technical area is in demand and very complex.