It seems that this could be the solution for individually on/off control: https://raspberrypi.stackexchange.com/a/49442/111436 and this: https://raspberrypi.stackexchange.com/a/8652/111436 for on/off for the USB hub. Both solutions worked on previous Pis so might be possible that they still work for the Pi 4.
– VTMExporNov 22 '19 at 09:11
According to (https://www.raspberrypi.org/forums/viewtopic.php?p=813383), sudo ./hub-ctrl -h 0 -P 2 -p 0 ; sleep 3; sudo ./hub-ctrl -h 0 -P 2 -p 1 should turn off USB power, wait three seconds, and turn it on again, without harming ethernet -- however, it was tested on a Raspberry Pi 2B.
– user96931Nov 23 '19 at 18:51
sudo ./hub-ctrl -h 0 -P 2 -p 0 ; sleep 3; sudo ./hub-ctrl -h 0 -P 2 -p 1
should turn off USB power, wait three seconds, and turn it on again, without harming ethernet -- however, it was tested on a Raspberry Pi 2B. – user96931 Nov 23 '19 at 18:51