Perhaps all you can do is be patient and supportive, assuming she'll gat 'back on track'. In addition, though, keep your ears open for any sign that she may have been experiencing stress of some sort. And don't hesitate to check this out with her very openly. I agree with you about the punitive response from the afterschool program; such responses are ususally not helpful. However, programs have their particular policies, and if otherwise you feel comfortable with the program you may just have to 'bite the bullet'.
I fully concur with the suggestion re: possible constipation. Sometimes all it takes is to clean out the bowels, stay on a regimen of stool softeners/laxatives for a bit. If the bowels are impacted, frequent soiling is one symptom, and it's often not obvious to parents that constipation is the problem.
First of all, take her to the doctor and make sure she's not severely constipated and there's nothing else medically wrong with her. That's often the cause of soiling in young kids.
It's not punitive, IMO...I worked for some time at a day care, and often children were turned away for not being potty trained at an appropriate age, or for regressing. 3 accidents in a week is definitely significant, and it takes a lot of time and unnecessary embarassment for the youngster to clean up a child that has soiled or wet themselves.