It is not your child's- or your- fault. She surely doesn't know what is happening.I can share with you my daughter's story. Some children- like my daughter- have a problem called encopresis. Basically, they hold in their poop. My daughter has had it off and on since 18 months' age. What happens is they hold in their poop and the stool builds up inside their colon and gets all hard so it is too painful to push it out. Then more stool liquifies behind it and seeps around the mass, causing the "dried on" stool you noticed in your child's underpants. It requires a visit to the doctor to evaluate and it REALLY important to follow up on immediately because it can lead to lifelong problems. Just being really constipated once and pushing out a painful stool can lead to problems with encopresis. Lots of kids have constipation. Do you look at your daughter's stools? Are they huge? This is one sign of constipation and it hurts. I was so frustrated in the past, thinking my daughter's poopy pants was an issue with potty training. My daughter used to hide from me when she felt a need to pass a stool because it hurt too much to use the potty. Then I'd see the underwear and feel so confused and frustrated! First, I switched doctors because her original doctor did not take my concerns seriously enough (look up "encopresis" online and see if it describes what you are seeing) and then we were referred to a pediatric gastroenterologist, who was fantastic. He did some tests to rule out more serious problems and then put her on a stool softener. She has been on it for a year now and is doing really well. We avoid hard cheeses and foods like peanut butter and limit bananas which cause constipation and work on drinking more (which has always been a challenge) and eating high fiber meals. I keep a stool log, to keep track of how often she poops and look at the consistency (yes, I know- seems like too much information, but is truly helpful). We can tell she is making great progress. No more smears in her pants and she feels so proud! The best part is not being frustrated anymore and being able to support her.
I read the other responses and would like to say a word about "lying." Your daughter probably has no idea what is happening to her and doesn't know what else to do. If you are like I was before I knew what was wrong, every time I'd find the messy pants I would get angry, so my daughter probably "lied" out of fear of my response. Once we had a good knowledgeable doctor working with us and had a plan, we were able to give hugs and encouragement instead of being angry and everything changed. She tells us what is happening now because she is no longer afraid and confused. Remember, she is only 5. All children that age can tend to wait too long to go to the bathroom, but if it's encopresis, this is something altogether different. It will not get better by just telling her to go to the bathroom. It simply hurts too much.