How to create a dynamic doctype that allows other doctypes to be related to one another

Suppose I have a DocType A and DocType B and DocType C.

This is scenario 1

And I want to quickly create a relationship DocType called ABC1 where the rules are

inside ABC1, A must be unique, B and C are optional. meaning to say ABC1 is the parent DocType of DocType A, B, and C.

but what happens is that usually A, B, and C are created first. Then many months later, the customer then says they need a ABC1.

This is scenario 2

Scenario 2 continues from 1.

After many months of ABC1 going live, so it’s now populated with data. NOw the customer suddenly says they want to make changes.

For e.g. they now want ABC1 to also include a new DocType D as a Child so it now holds A, B, C, and D.

Or now they want ABC to be unique together on top of keeping A as unique.

How to do scenario 1 or 2 in frappe?