I think you need to create a loop in a microflow to achieve this:
Retrieve the parent, if found, retrieve the parents parent, etc until you reach the top.
Then retrieve the children, and for each child, retrieve its children.
And add all discovered folders in a list.
Does this help?