Efficient way to selectively unpower USB ports
It's certainly possible in some cases, but it depends on the hardware you're running.

Some USB chipsets allow "per-port power control" (the name of this feature seems to change from one manufacturer to another).  Your mileage may vary because this feature appears to be an optional part of the USB3 spec.

There is an unofficial and probably incomplete list of chips that support this feature here: https://github.com/mvp/uhubctl/blob/master/README.md

Uhubctl is a Linux based program that lets you turn on and off USB ports on compatible chipsets.  Works for individual ports on PCIe-to-USB adaptor cards too.  It can be run from the commandline or a shell script and you just nominate which port you want to turn on or off.

If your hardware contains one of the supported chips (and the manufacturer chose to implement it on your motherboard / PCIe card) then that is one option that works for me natively under Linux.