A hierarchy of roles is much less dangerous as a hierarchy of positions as it is less likly that egos come into the way. In one role I might have enough power that a few people must follow my decision. But the people might empower roles where I have to listen to them. This embraces a more cooperative communication style.
Also it might look like the overall “system“ is more complex — but it isn’t true.
Holacracy allows more direct communication where in a traditional setup decisions need to be bubbled up and to communicate with other nodes you have to travers the tree. A very time consuming, and with people involved, error prone operation.
Also I think that your approach of mapping interaction in companies to computer science data structures is flawed — it doesn’t take ego and politics into account. Holacracy is more immune for those.