Someone I once had to file a restraining order on, did leave me alone then.
This is a long story and embarrassing, but what I want you to know about it is; he told me many years later, that had I not filed the order, he never would have left me alone.
The police insisted I do it. Talk to them yourself. In light of the non stop harassing texts and sexual harassment, you have cause.
When I started going to psychologists, this relationship was a red flag for issues with ME. Why I even put myself in it in the first place.