Basically I want Subtag1 in this example to also be in Tag2 so that it can be selected in the tag selector as a subtag of both tags.

Would an extension be necessary for this? Can anyone think of a solution for this? If you tell me why I don't just put it as a secondary tag, the reason is that secondary tags appear at the end of the tag list (when you choose tags for a discussion) and they don't respect the hierarchy visually, when selecting several subtags (they are sorted alphabetically), for example Tag2-> Subtag4 -> Subtag1 instead of Tag2-> Subtag1 -> Subtag4.