Verifying electric brake current with opto-isolated feedback
Probably the most non-invasive way is to eschew the optoisolator idea and use a Hall current sensor. There are various options, from small QFN parts that have an input loop built into the chip up to packaged parts that you simply pass a cable through. LEM, Mexlexis etc. are manufacturers.
Output tends to be in the 100-400mV/A range so you'd also need a comparator or to use an ADC and make a decision based on the value you read. Make sure the DC drift is compatible with your application (that it cannot give a false indication at the minimum current).