Yes, I think it was insensitive. What can she do to not "hear" things from him? That's kind of victim blaming. She wasn't "singing a song" about being done wrong, she was sharing a exchange with you. And how could she possibly prevent from hearing such things? He's the father of her children, and still technically her husband, right? Even if she says "I don't want to hear it" she's not in control of him, and if he sprays it at her, she's going to get hit.
There is a difference between bad things happening and our reaction to them. You can absolutely be a friend who helps her manage her reactions, and help her find ways to cope and prevail. But what you texted her suggested that SHE was bringing it all on herself, when clearly it's her husband's behavior that is at fault.
I would suggest you step up and address this with her, if indeed you still want to be her friend and a source of support. Recognize that it probably made her feel like you were blaming her, and follow up with telling her how you don't want HIS awful choices to affect HER happiness, and remind her that you believe she can get through it all. And next time she shares some of the craziness he's putting her through, start by asking her how she feels about it, and steer her in the positive direction she wants to go, without an ounce of blame for HIS lifestyle.