Oh, I've spent the past two weeks agonizing over posting a reply. I have a 5 year old with a serious emotional disability. He has Post Traumatic Stress Disorder, severe anxiety, panic attacks, Sensory Integration Disorder, and some developmental delays.
Like the OP's daughter, he is not yet fully potty trained.
My hesitation with posting was for this reason, I did not want the OP to think that I am equating what happened to my son with her daughter in any way shape or form. My son was adopted from foster care and suffered some pretty severe abuse and neglect at an early age. Again, a disclaimer, I am in no way saying or even implying in the least that the OP's daughter has been in any way abused or neglected.
My reason for posting is this:
When we got "M" at 25 months of age, we were told he probably had autism. An example, he would stare at the ceiling fan in an unresponsive state. (Obviously there is more to autism than that.) He would scream, have meltdowns, had very little language, in short, he appeared to be in his own little world. In my son's case, he was having dissociative episodes, he couldn't cope and would "check out." Only after seeing a pediatric psychiatrist who specializes in children under 7 yo was the real mental health issue diagnosed.
Mental health issues are not commonly diagnosed in young children and it takes an expert to figure it out. (My son's school still swears he has ADHD and I have to explain, no, it's severe anxiety.) Many behaviors in children with mental health issues are also found in children with ASD. (Meltdowns, delays in toilet training, sensitivity to sounds, lights, etc.)
My point in posting is not to scare you but to encourage you to see a psychiatrist for very young children. (I am not implying that the OP is anything other than a great mother.) There are treatments available for children with mental health issues.
Best of luck to you.
I'd be interested in hearing from other parent's as to how day care centers can get away with requiring all children to be potty trained when for some children with disabilities, that isn't possible at 4 yo. My son goes to preschool through the school system so he can't be "required" to be potty trained.