If there was ever a situation where divorced parents have to love their daughter more than they dislike or distrust each other, it’s this one.
I have no way of knowing if her mother is behaving inappropriately. Maybe. But it’s possible she has the girl in the bathroom with her because she is afraid to leave her alone. Rightfully so, if your daughter has been self-harming, suicidal, and running away. Your daughter’s claim that a “personality made me do it” could indicate dissociation. Or it could be a way she avoids taking responsibility for having taken a side in your conflict with her mother.
To file a custody suit put you and her mother in an adversarial position. The two of you need instead to be cooperating in finding excellent treatment for your daughter. That probably means going — together — to a family therapist to figure out how to work — together — in the best interests of your daughter. That means working — together — to get your daughter assessed and to work out what kind of treatment she needs for her depression and suicidality. It means finding a mental health provider who can help you understand your daughter’s autism and what supports she needs to be all she can be. It means working as a team as parents even though you two couldn’t sustain a marriage.
I hope you and her mother can put aside your differences for the sake of the girl. Depression is treatable. Being on the autism spectrum is not a disease. It can be managed. But your daughter does need a lot of good help and support. She doesn’t need to feel caught between her parents.
I wish you well.