it appears that he might be having some small cut on his anal opening or soreness giving rise to this problem.
Apply antibiotic cream on anal region.
as it gives more pain while passing stool.
Give mild laxative liquid at night.
Avoid giving junk food.
Ok and take care.