HELP Toddler scared of pooping/passing gas

My 2.5 year old is afraid to poop/ pass gas. She holds it in til she’s crying in pain. She goes DAYS without pooping.

We give her Miralax everyday, once a week i give her 1/2 a chocolate laxative, we’re really close to giving her an enema cause she just won’t go!

She is NOTTT constipated, it’s very runny/mushy when she goes it spills out of her diaper (like back when she was a newborn) We’ve changed her diet, she’s been eating way less cause the food she used to enjoy she can’t really eat no more. She loved pasta but doesn’t like whole wheat pasta. Loved peanut butter sandwiches but instead of white bread I replaced it with whole wheat and she doesn’t like that. She drank Pediasure every night and morning but bc of the protein that caused the constipation, I stopped (she was drinking it cause she stopped eating when she got sick with pneumonia and loved it ever since)

I don’t know what to do now :( we reward her after she poops and always give her positive reinforcement, we’re a little more active now to help her go but she just wonnntttt go.

Has anybody else delt with this? I’m really stressing out. Idk what to do anymore. I don’t want to keep giving her the chocolate laxative, it hurt my stomach so bad the time I took 1/2 of one I can’t imagine the pain she goes thru holding in her poop.