There’s kind of 2 ways of accomplishing this which depending on the set up could have different performance characteristics.
The most straightforward way to accomplish that would be:
for (TObjectIterator<UClass> It; It; ++It)
// It is a child of the Parent Class
UClass* ChildClass = *It;
But since there are a lot of class objects and maybe there are not nearly as many of your inventory class you could instead go looking for the Class Default Object of each class.
for (TObjectIterator<ParentClass> It; It; ++It)
// It is the class default object instance of a child class of parent class
UClass* ChildClass = It->GetClass();
One potential problem with both these approaches is blueprint classes and their class default objects will not be loaded in to memory unless something causes them to be (generally via direct referencing).
If that is a problem for you then what you many need to do is use the AssetRegistry to get all the blueprints and then work out from there which ones are children of your root class. If you look at FClassHierarchy::PopluateClassHierarchy you’ll see how this is done for the class pickers in the editor details panels.