She is withholding her poop because she is constipated. Then when poop is constipated it HURTS when it comes out. Then the child won't want to poop again. It is a vicious cycle. Because it is an emotion based problem (it hurts when pooping) and a biological/medical problem.
Laxatives/suppositories are not recommended, especially in children. It can become habit forming and it is NOT supposed to be used indefinitely.
Her not wanting to poop, is an emotion based issue.
My daughter, even if we did not force her to potty... got Constipated. We had to see a Pediatric Gastroenterologist. I would suggest that. A regular Pediatrician, will not know how to treat this.
For us, the Specialist said that is can take MONTHS to overcome... emotionally for the child and the constipation problem which is a vicious cycle because they "withhold" it. The doctor says it then causes "anxiety."
The Pediatric Gastroenterologist we saw, abhors laxatives and suppositories.
Next, if constipation and not pooping gets bad enough... it can develop into "Encopresis." this is bad.
I suggest, you see a specialist.
She has anxiety about it, or it is a sense of control, or it hurts when she poops and she does not want to.... it seems to be a real emotional issue for her.
Does she have any problems? Any stresses? Anxiety? Sibling problems? School problems?
All the best,
Susan