I've got the basics going. The critical piece that's keeping the macro from being useful (assuming I plan to use it while another toon is on the main screen) is a way of retargeting the charm-broken pet.

If there's a / command to target a creature attacking you I don't know what it is. I tried assisting myself, but that doesn't work because you're not actually targeting the creature to begin with. Similarly you can't target yourself and cast through.

*shrug*

The best alternative I can come up with (haven't tried this yet), is to figure out what the break message is when a pet breaks charm and use ACT to set of a warning noise. At least then I'd have a way of knowing the charm was broken (other than my coercer being dead).