Hello and hope you are doing well.
The reason why the child is suffering so much is probably because he is not having enough roughage in his diet.This could lead to him having an anal fissure and increasing his discomfort.
The child is three years old, so by now you could give him vegetables and fruits. You could give dates and raisins on a daily basis. Children should be encouraged to play about in the open. They should have regular time schedules for mealtimes.The food is essentially home food with atleast 2 to 3 glasses of milk, fruits and liberal helpings of vegetables.To avoid junk foods like fried stuffand eating too much of chocolates. To tide over you can give him the laxative for about a week and then stop.
Hope this helped and do keep us posted.
Well he may be not getting enough exercise,not getting enough fiber in his diet, or dehydrating.
Then again, some of us seem to have an unfortunate natural tendency to infrequent/difficult bowel movements (perhaps due to under-sensitive colons and rectums).
Try every dietary fix you can - more green veg, pulses, fruits, nuts etc, reducing meat intake and dairy intake.
And if a chemical crutch is needed to keep him doing a daily do - it's much safer to use enemas and supppositories than Miralax. (Laxative addiction is a myth, but many people attribute horrific side-effects to Miralax).