Ideally, you would not include those in your header files but your .cpp file instead. If you reference each component in your .h, you could forward declare the class like so, just after your includes :
class UCustomComponentA;
class UCustomComponentB;
Also, if you don’t need to directly specify a type of custom component, but only it parent, you can just forward declare that class, but still assign any of your custom component to it. For example, you could forward declare class UCustomComponent that is parent to UCustomComponentA and UCustomComponentB, add a reference to such a component (UCustomComponent* mMyCustomComponentPointer;) and in the .cpp you can assign it a pointer to a UCustomComponentA component (for example).
Hope this helps!
Mick