I used to have this problem when I was a little girl, all through elementry school really. It was so embarassing. I would soil my underwear several days a week, sometimes everyday. It was terrible.
I got to where I would just go to the bathroom and throw my underwear away, then go the rest of the school day without underwear.
Eventually, I literally started running out of underwear to wear at all, and started having to go to school without any underwear because I had thrown so many away.
Finally, I had to talk to my step mom about what was happening.
The Doctor said it was diet related: because I practically lived off just junk food growing up, sugary, fatty, terrible food. Like nothing but little Debbie snack cakes, sugary soda pop, and chocolate. Turns out, that stuff is pretty terrible for your bowels.
So when I ate better, with more leafy green vegitables, less dairy, and non-processed meats, and avoided junk food, it got alot better. Yogurt helped alot too.
But, I am a little ashamed to admit, it started happeneing again to me in middle school right after I started getting my period at the beginning of 6th grade. I got to where I was eating bad again, junk food from vending machines, etc, and my bowels were paying the price. Then it just went away "mysteriously" later that fall semester of 6th grade - only later did I figure out it was because I started smoking cigarettes every day then, and have ever since!
Lol, obvi cigarettes are a terrible solution to that problem, and nobody wants their daughter to start smoking cigarettes all the time. I cant stand how addicted I am still today, and if I could go back and tell my 11 year old self to not start smoking that'd be great - but oh well. Too late now that Im allready addicted. Hopefully your baby wont start smoking too!
I think that diet can go along way to fixing what may be wrong. It always worked wonders for me! Hope that helps!
Since your child has had constipation since birth, go over to the pediatrics forum to see if you can get more comments on infants and children with constipation. Just generally, if her stool is hard when it first comes out, then that is constipation. A lot of times, after a person passes hard stool, the rest will be soft, and in fact will seep out as diarrhea, which is what is happening to your daughter.
Put baby wipes near the toilet, so she can use those as a "final wipe" whenever her stool gets runny like that, and it will keep her from itching so much. There are thicker underwear for children who have "accidents," too, to reduce worry.
The fact that she's had constipation since birth and is still having some hard stool, this means she needs to see a pediatric gastroenterologist. Something more definitive may be going on than just plain diet, as you are beginning to look into. Just the same, diet is often to blame for constipation or at least contributes to it. You say you are on a special diet for your condition, but your daughter should not share that diet, I don't think. Do a little research on what five-year-olds ought to be eating, the special nutrition needs for children, and so on, and feed her that way instead.
There is also the possibility she is lactose-intolerant or has some other allergy like that, which would explain why she's had problems since birth. An allergist can be consulted for this sort of thing, altho the pediatric gastroenterologist ought to be able to get to the bottom of her chronic constipation issues. In the meantime, you could try milk that some stores carry that is for lactose-intolerant people, it can't hurt. Also, fruit should be given before she eats a meal, rather than as part of a meal, or better yet, separate as a snack.