I think if he has any regard for his daughters emotional wellbeing that he will agree that he should leave it a while before he introduces this new 'friend' to his daughter.
I agree with the OP though 5 year olds aren't as dim as everyone thinks they are. When my parents had arguments when I was 4/5 I knew exactly what it was they were arguing about. They got on a lot better now, but we had some real troubles with my sister.
I think if he is sensible enough and agrees to meeting up with his DD for a nice long day together every week or every other week for a few months, then maybe things could be discussed about at that stage introducing the new 'friend' in one of those meetings then a few months down the line, to stay with them.
But honestly, it would confuse her understanding of home life. She has known Mummy and Daddy together and that is it. I think discovering so soon he is with someone else and not her Mum might be quite shocking and upsetting to her, even if she is quite young.
I could be wrong, but then I could be right.
I think it shouldn't get to the stage of court. If the father has any emotional caring for his daughter he will agree to this. If not, I can't see the court disagreeing that it could confuse her and upset her more if she was put in this position. Besides if she is introduced too soon she might actually end up disliking this other woman, feeling she has taken her father away. If it's a gradual thing, it will seem more natural and comfortable for her and be less confusing.
Sorry about that novel, OP.