Oh gosh the poor thing... I feel so bad for her.
Please don't express disappointment/frustration on her.... even if you do feel it. She is obviously stressed and having anxiety about all of it.
As the others said, take her back to the Doctor for a follow-up and even re-testing her, to make sure the infection is all gone. Completely. Even if still there at a low level, it can affect her.
As for the pooping, there is also something called "Encopresis." Which means an INvoluntary leaking of feces.... which the child cannot control. So maybe check for that as well.
Her accidents may be medical based... as well as now, emotional based. So.... try to sympathize with her. I really do not believe, she is doing this willfully nor on purpose. So punishments or lecturing her or confronting her... will not help but exacerbate the issue.
On the other hand, talking with her sympathetically... may help her understand that you are not "disappointed" in her... but empathize "with" her... and talk about it, maybe she has something going on internally that is bothering her or affecting her. Has her life changed? Any new stresses? Any new Caretakers? Any new schedule changes? etc....
Often times too, "stress" can create accidents in kids, who are potty trained. My daughter had stress related accidents when she was about that age.... when she had started Preschool.... and then when I was pregnant with my 2nd child....
There can be many reasons.... so until it is found out... try your best not to admonish her... I am sure it is just as hard for her too and not fun.
Try to find out the reason.... and think widely and openly about it.
all the best,
Susan