L.M.
What your saying sounds like what my son is going through. Did your doctor say that your son has Encopresis? That's what my son has (he's 6 yrs old), basically he just started having poopy accidents. It had started out as just marks in his underwear, which I didn't think much of, until it became full on accidents. My son also said he didn't even know when it was happening. I knew there was something wrong. Encopresis is basically loss of control of the bowels, it starts out for whatever reason with constipation. Which in my case, I hadn't noticed my son having that, and I was still wiping for him so I noticed when he pooped. Either way the bowels get so backed up and impacted that they quit working. He did not have control of his own poop. Now that we've been to the doctor and understand the problem fully we are treating it. Our son wasn't put on Miralax, I believe because his body had finally cleared itself out on its own, but that is common for a doctor to put a child on a laxative for it. We now have to re-train his body to know when to poop, it can take months to fully recover, by having him sit on the potty after every meal. So far its working, we missed one day where he didn't poop, and sure enough the next day he had marks in his underwear, we are back on track now. Oh yeah, and our son now wipes himself, as told to him by his doctor. Now that he's confident enough, he will actually go potty at school.
So, I don't know what all your doctor told you but look up Encopresis and see if that makes sense. Its kinda serious if it doesn't get taken care of so maybe go back to the doctor's. Or a different one that knows more about the problem.
Sorry that you and your son are going through this, Just know that it is not his fault, and give him lots of praise when he does go potty in the toilet and or wipes himself. Deffinitley don't get mad that he's having these accidents. Hope this helps.