The Taranis X9D at least has a momentary 2pos switch. That is to say, it flips back to OFF when you let go, but it's still a full sized switch.
That'd be perfect for this use.
It would totally work, though I have had my accelerometer get confused when I'm exactly upside down, so don't trust it too far without testing.
If you have a spare switch or button it should be as simple as configuring it to set Angle mode on. Flip the switch, FC takes over and levels you.
I say "should", because I have tested it in depth. Though I have flipped to angle mode (when I still had it configured) to bail out of a bad situation in acro, and it did work.