This is a large part of the problem. Keeping track of bowel habits is not a big agenda item for most children. Neither is answering the urge. They don't want to stop what they re doing to go to the bathroom and have a bowel movement. If they don't honor the urge, they may not get another one until the next day.
Treatment is labor intensive.
Four areas need to be addressed. Kids don't drink enough water. Your child should drink 4-8, eight ounce glasses of water per day. Put a plastic container in the fridge and make it their job to empty it by the end of the day, and fill it before bed. More fruit and fiber.