My 4 year was doing that. He was holding his poop because he was scared to go poop. So when he could no longer hold it, some would leak out.
I have a 7 year old daughter that is doing the same thing. I can't be of much help, but I can try. I know that the first step is to define the real issue. Regression in the form of toiletting is usually associated with things as big as a traumatic event, to something as simple as a change in a child's daily routine.
I have identified my child's issue. Her father left and she was certain that it was her fault. It never even COULD be her fault, but she believes that because he didn't say goodbye. On top of that, he left while I was only 4 months pregnant with our second child, which is now just over a month old.
The issue is that no matter how much I explain to her that it was NOT her fault that her father left, no matter how much positive reinforcement I give her, and no matter how much one on one attention I give her, this issue is still ongoing. It has actually grown into a concern so large that even her teacher had to get involved due to children at school and their cruel words about it.
I wish that I could tell you how to fix this, but all that I have ever found or heard was to get professional help. I pray that you are not as financially drained as myself and that you can actually get this help for your child if needed.
The only personal advice I can offer is something you likely already know. Do not punish, become angry, or in any way make the accidents a negative issue. I made that mistake once and found that the issue actually escalated then. Only with discretion and positive reinforcement can children get through this.
Best of luck.