I went through nighttime peeing with my daughter until she was 7. After testing her for everything, including diabetes, I finally went to see a Naturepath. What she told me worked immediately to stop the problem, which is physiological rather than emotional...
The Problem: The bladder releases when blood sugar drops so keeping blood sugar levels up is the key to kids sleeping through the night and having more awareness around needing to pee during the day.
The Solution: Making sure your child is eating a high fat, high protein diet, low sugar diet throughout the day and giving a large high fat/low sugar snack before bed. Water should be given liberally throughout the day and before bed also because dehydration releases the bladder as well (the brain thinks it is starving and blood sugar drops when dehydration sets in).
Bedtime snacks: Cheese with bread or crackers (or just cheese), peanut butter or nut butter with bread or crackers, bean and cheese burrito, fish ~ tuna on toast... what ever you child will eat that is high in fat/protein and low in sugar (make sure your peanut butter is not sweetened).
Water, water, water ~ the more water your child can drink the better.
You won't believe how well this works. Start today and he will be all over the bed-wetting and daytime accidents by next week.
About the pooping in her pants, your five year old is old enough to tell you why she isn't getting to the bathroom. Ask her. If she says, "I don't know," you should continue the conversation, leading her down some paths of discovery:
Is she afraid to poop on the toilet? Is she afraid she will be flushed down? Is she afraid that if she poops in the toilet she won't be your little baby anymore and you won't love her?
Little girls are easy to communicate with. The more you lead her down her own self-discovery path, the better you will both communicate.