Your code is fine.
The hierarchy doesn’t matter in that sense (it has other purposes). You can use whichever types you want (you should respect Schema.org’s expected types, though).
A simple example: A
MedicalScholarlyArticle (which is a type pretty deep in the hierarchy:
Thing > CreativeWork > Article > ScholarlyArticle > MedicalScholarlyArticle) can reference (i.e., include as child) a
Thing (which is the super type of everything):
<div itemscope itemtype="http://schema.org/MedicalScholarlyArticle">
<span itemprop="about" itemscope itemtype="http://schema.org/Thing">The whole universe.</span>
However, note that in your specific example, the "children" items are not related to the parent item. They only happen to be nested under this item, but there is no property that connects them. So Microdata parsers won’t recognize that there is a parent/children relation, it’s "flat" for them:
If you’d use a property (for example
about), parsers would recognize the relationship: