You can construct this as a ragged hierarchy in Anaplan. Basically, just a single list with parents as members of the same list. Each child can have a unique number of parent(s). The challenge however is that modules can only be dimensioned by the lowest members of this list.
Another possible option is to set up a module with each line item as a list member. Then create line item subsets at each unique level (so 6 line item subsets) and use COLLECT. The drawback in this option is that any new additions require manual maintenance, each new SKU would need to be added manually along with its formula
The last option I can think of is to force a balanced hierarchy by creating 6 lists for each level with dummy members at each level to serve as parents for the children that need them. The drawback here is that the number of levels should be fixed. For instance if you have 6 levels right now, adding a 7th level would require an entirely new list.