Child who refuses to poop please help.

Miranda
Hi Ladies
I have a 6 year old that has had issues with being constipated her whole life I've had her to a Dr. Who said to give her more fiber and have her drink lots of water which we do but since it's hurt to poop in the past she holds it in for days and then she's in miserable. Does any one have any advice for me on how to help her not hold it. Thank you