hi - Not sure if this helps - but it seems that pediatricians have fairly recently figured out that pee potty accidents in older children are linked to "stealth" constipation issues. Long story short - a child can poop regularly but still have sufficient chronic constipation that leads to chronic low level inflamation in the tummy area. As a result, the child does not get that funny feeling all the time or perhaps only gets it during extreme duress. That may mean pee accidents or poop accidents or both. here is a link to the article -
http://www.slate.com/articles/life/family/2012/03/bed_wetting_the_simple_cause_your_doctor_probably_missed_.html
For our child, that seemed to be secret issue on pee accidents (very small but bothersome). So, we use miralax every day and sit on the potty every morning until the child poops. We of course also push veggies and water but that only goes so far for the child's particular issues. The child always claims no need to poop after breakfast, but after a minute or two of sitting - poop always comes. And miracle of miracles no more pee accidents. So i really think it was not a cognitive issue at all - it simply was that he was not getting the signal of a full bladder or full colon because the chronic low level inflamation interfered with it being sent and/or recieved.
This might not be a 100% cure for you, but if it only improves the situation, that is a start. So, if you are still having accidents try and discuss the issue with your pediatrician. We also have a very very strict rule of always going pee before we leave the house or as soon as we arrive at a new destination before distraction can get in the way. It is also a family rule - everyone goes potty before we get in the car "so mommy and daddy do not have an accident." the ped also said that helps with training child's body to expect to use the potty at ceratin times of day and certain places.