Wow... your son sounds like mine (except mine is almost 7yrs!)
I have to carefully watch what my son eats and also feed him the right foods.
Avoid processed foods and limit foods like cheese that will cause constipation.
Have your son drink water instead of juice - it's a good habit to start young anyway but plenty of water helps to loosen up bowel movements.
Increase natural fiber - many foods are high in fiber. For example, pears are very high in fiber and taste good, too. Push fruits for snacks and offer it with every meal. Look online for a full list of high-fiber foods - you'll really be surprised what foods are high in fiber.
Hope this helps!