Let's start with saying that your source schematic needs to be ignored when it comes to good practise. Just so you know not to try and learn much from it.
They have the MCU connected directly to a transistor's base, with no resistor, which is already bad form, even if you know that 99 out of 100 cases it'll probably be fine.
But to then add an opto-coupler on the other side in the return path is nonsense, your domains are already coupled through that first PNP transtsistor, opto-coupling is a waste of space and money, since just a transistor stage, or nothing at all, would do the same trick.
Then, there's no drawn-in pull-down resistor on the opto-coupler output, so it will not, in fact, "go low", because it can't.
Add to that, the load is switched by a PNP transistor, where the load is in the emitter-path of the transistor, so this will never work properly, since the transistor and the load will balance out at some point, probably about 3V to 4V for the load. And as such, in a similar manner, whether that "charge indicator" will be properly triggered enough to make an LED light up is severely questionable.
It may work for a 100mA load using an opto-coupler, because they only need about 1.1V, but still then is it a bad design.
Basically the entire schematic needs to be re-thought and I, for one, am too hungry and tired to do that right this second. Maybe later.
Edit: Sod it, I'll add a schematic....

simulate this circuit – Schematic created using CircuitLab
The comperator senses the voltage across the pass MOSFET, if the voltage on its negative terminal goes a certain amount of milivolts below its positive the output will enable high (some, or most, Comperators need an external pull-up resistor though).
The pass MOSFET is a P-type in the VCC path, because switching the ground is stupid, because a lot of stuff can connect grounds together (power-ground, audio-ground, etc) and usually VCC is just used per device. So you always switch on and off the VCC, not the ground.
To buffer the MOSFET an NPN transistor is added, so you can drive it with any voltage, 3.3V or, what you like, but if your controller runs on 5V, you can even leave it out, but then the MCU will have to output low to enable the MOSFET.
Once a MOSFET turns on it will present a little bit of resistance, if you select one with about 0.1 Ohm to 0.2 Ohm on-resistance ( Rds[on] ) that allows a small voltage to drop across it when it's on, but not enough to really hinder your charging. When in doubt, make the supply 5.2V to compensate.
Make sure your MOSFET is specced for logic levels and that your comperator has an offset voltage around 50mV. 50mV offset/hysteresis in the Comperator will be about 500mA with a 0.1 Ohm MOSFET, or 250mA with a 0.2 Ohm MOSFET. So the MOSFET's Rds[on] and the Comperator's offset voltage together will determine at what current the Comperator's output turns on.
R4 may be skipped, or increased in value, to reduce "turned-off" leakage, but the detection of "something is no longer present" will take a bit longer, especially if the MOSFET is a relatively high quality. (Very high off-resistance)
For more in-depth, I am seriously too tired right now.
Best Answer
The first thing to realize is that you have misapplied your ammeter. You must insert such in series with a circuit by first breaking it, never in parallel. Were USB ports not typically current limited, in shorting VBus to ground through your meter, you would have blown your meter or its protection fuse or the host device's main board.
Next, realistically, it will be hard to detect this by electrical means except in software on the USB host chip. Devices with functional USB peripheral interfaces (ie, not, mini-drone battery chargers) have a pullup resistor on the D+ or D- line, however detecting that with circuitry not intimately cooperating with the USB host controller will be tricky. Were you able to modify the software on the host controller, it would be easy - the information is already obtained while getting ready to enumerate the peripheral, and it would be trivial to drive some available output to light an LED as a result.
One possible electrical option would be to insert a very small shunt resistance in the USB VBus line, and monitor the voltage drop across this with an op-amp. It is conceivably possible that an existing PTC resettable fuse could even function as the sense resistor, since even when cold it probably has a small resistance, but this will vary a lot with rating, and may be only a fraction of an ohm. That would mean you would need a well designed and carefully connected circuit to sense a low-current peripheral.
But for a DIY graft-on minimally modifying the existing circuitry, I think your best bet might be optical or conceivably mechanical. Perhaps you can rig an IR LED and phototransistor looking through the existing cutouts in the USB socket to detect beam blockage resulting when a plug is inserted.