Found this to be a great introduction to an alternative way to model behaviors than a FSM. I used behavior trees for robotics and AI applications and found them generally simpler and that they produced much more modular and reusable code.
I would say that behavior trees are a higher-level abstraction on top of FSMs, such that behavior trees can be represented by equivalent FSMs (although with more states/transitions).
Does anyone have experience with relevant Python libraries? I see a lot on Github but can't tell which is better.
For classical Hierarchical FSMs my go to is transitions: https://github.com/pytransitions/transitions
I had a similar idea when I was working with them but I never got around to trying it. I was primarily using them to compose other behaviors I had developed. It is not my specialization so I'm not up on the latest research around them but I would wager that there is some interesting research that could be done in that area.