What if at the output, u added some RLC filter, to smooth the OP, and feed to a comparator/op-amp peak detect circuit ? Most of these little SMPS I've seen, that use a controller chip, it's pretty easy to tie on a shutoff, that just takes some pin low, like their internal op-amp OP, which usually has a pin for compensation, and as the external shutoff, when pulled low. And it could be isolated, just use a cheap opto-coupler, if there's a primary hot side, and secondary side.
I guess it would have to be done right, to avoid oscillations, but really if it was a custom built charger, they would just be sensing off the battery too, and adjusting the switching to be at the desired voltage or current.
Like over current in a basic DIY analog powersupply, yeah what is it supposed to do long term, you could just make it shut down for good, with some 555 timer , 1 shot circuit added.