I would personally take the texts from the father to the local PD and get a restraining order, nothing like a paper trail if he decides to go off the rails and do something stupid. And a big YES to the treatment center if your daughter is willing to go, I have seen enough documentaries about Heroin addicts to know it is a hell of a drug and the circumstances your daughter is in right now would make relapse very likely