While we still struggle with accidents, we've tried a lot of different ideas, therapists, doctors, tests, anything. While we still haven't nipped this in the bud, we do seem to be making progress. A lot of this is thanks to reading It's No Accident: Breakthrough Solutions to Your Child's Wetting, Constipation, UTIs, and Other Potty Problems by Steven Hodges and Suzanne Schlosberg.
It's no secret, they believe most (almost all) kids who have accidents at night or during the day are due to constipation. More specifically, our kids aren't getting enough fiber in their diets (all kids really) and so a lot end up with poop stuffed all in the their colon and the intestines, never really clearing out. So even though kids poop daily, it still doesn't ever clear out.
We haven't gotten to doing an enema or Miralax yet, we really need an X-Ray anyway and to see the doctor again. But adding fiber has definitely made a different for both kids. If you are jut beginning potty training, or still having accidents, I can't recommend enough how useful this book was.