What everyone else said.
If you can possibly afford it, buy kid a new phone and do NOT give him the new number. There should be a way to back up the phone and put the other info on her new one. Give this phone to your lawyer--maybe he will send more messages in the meantime, but at least kiddo will not see them.
This borders on child abuse, and your lawyer should seek an immediate order prohibiting him from direct contact with your daughter. If he wants to talk with her it has to be by speakerphone so you can listen in.