Sigh..Toddler constipation

We have had the month from hell all starting from the flu. After a week of antibiotics my little guy( 3yo) had a streak of 7 days with no bowel movement.! We tried all the things-prune juice, pear purée ice pops, olive oil, fruit juice, drinking extra water. Even diff body positions like squatting,belly massages,knees to chest, and warm baths. NOTHING WORKED. Gave up and gave him Miralax. Which I have some weird guilt about bc a friend of mine asked if I “knew how damaging that is for their body”! It did work, but wow he was in pain even though his BM was soft. Like on his tippy toes shaking crying like I’ve never seen.He won’t stop crying on and off for 2 days now “my booty hurts”.

Some questions/ thoughts I have that I’d like your perspective on is

-What did you do to help your littles when they were constipated?is Miralax a horrible choice? Any alternative options?

-How long till the body regulates again?

-We were starting to make progress with potty training.(still wears diapers)Now I’m wondering if he is just going to withhold poop bc he’s scared moving forward.Anyone have any words of experience?

-Is this worth a trip to the pediatrician,I’m so confused bc how would they even help?

I’m so over hearing the screams and cry’s when he has to go poop. I’m about to go crazy.