Well, you proposed macros, but they are resolved at compilation time, so there is nothing that could be changed once the compilation happened, especially not at runtime.
To identify a plugin, usually a triplet of 4 characters each are used, to identify the plugin. The filename of the component or .vst3 doesn’t matter at all. For AU, one of the identifiers is for the type of the plugin, e.g.
aufx for effect,
augn for generators or
aumi for instrument. This will define, where the host will list the plugin (e.g. as insert or as instrument).
So I guess, with how current hosts and SDKs are working, you will have to compile one version for each supported case…
EDIT: some companies have created wrappers, like WaveShell, so there might be a way to pack more than one plugin into one component / vst… I don’t know, how that works internally though…