Could this be done in software? I'm very uneducated on the topic but doesn't your computer need to know the capabilities of a cable when it's plugged in? (USB speed, PD support, etc.)
At least for e-marked cables, this seems possible, and once the other side is plugged in at well, it should be clear to the controller what it is and what type of cable connects the two devices (only 2.0 cables supporting at least 3A/20V are allowed to not have a marker per the spec).
I have a giant stack of cables and it would be nice to know what they can do.