I would love to help with your question... it sounds like things have been very difficult for you all lately!
First, I am assuming this is a new behavior? That is, your son toilet trained in the past and was fine for a while but now seems to not care and is having accidents? The reason I ask is this: if he never toilet trained, and has had accidents his entire life, that strongly suggests a more medical cause (like a neurologic problem) versus a largely behavioral one.
From the sound of your question, it sounds like he has the capability to stool appropriately... sometimes. If that is the case, then I'll give you my opinion about what may be contributing to this, and what can be done about it.
I suspect that there are two issues here: a behavioral one, and a medical one, and the truth is, they are probably related.
Without examining your son, or knowing any more about him than you put in your question, I would strongly suspect that he has what is called dysfunctional voiding syndrome. This is a problem that is triggered initially by constipation and reinforced by willfully holding back stool... until the nerves that tell the brain that it's time to "go" don't work so well.
Essentially, the problem is that his brain and his bowels do not communicate well any more, and the focus of therapy is to fix that. We have to get his bowels to talk to his brain again - and his brain to listen!
The first step in treating dysfunctional voiding is to treat the constipation. Dysfunctional voiders may stool every day and therefore may not appear to be constipated - but even though they poop regularly, on the inside, their bowels are still stretched and distended with stool.
Typically, the best thing for treating constipation is a medication called Miralax. It's a powder that dissolves in fluid and is essentially tasteless; you can get it over-the-counter. It is safe and very effective, though it sometimes may take some trial and error to find the right dose for your son. You should shoot for a daily dose that keeps him stooling at least 1-2 times per day.
You need to use the Miralax every single day for at least several months in order for the bowel to decompress back to its normal size. If you stop it before then, I can almost guarantee that you'll have problems again (and this may be part of the reason why your son has had problems... then been fine... then regressed again.)
Second, once the bowels are cleaned out, you need to get your son to start to re-learn his body's signals. The best way to do this is with a scheduled voiding regimen. That means that after every meal or snack, he goes and sits on the toilet for 10 minutes. He does not have to stool every single time - but he has to try. As you know, after you eat a meal, the body experiences something called the gastrocolic reflex, where there will be some contractions of the bowel and colon, and we need to take advantage of those.
At age 11, your son should be fairly upset about stooling himself - most children his age would be mortified! It sounds like your son is... not so mortified. Still, I would focus on giving him positive reinforcement for doing right rather than punishing him or fussing when he has accidents. He is perhaps a little old for a "star chart," but I would do something similar, in which he earns increasing rewards for every day/week/etc. that he goes without stooling himself.
You should see your son's pediatrician to talk about all of this. Specifically mention the suggestions that I've made and see what they have to say - most pediatricians see children like your son all the time, and your pediatrician will be your best friend as you work through this.
Dysfunctional voiding is extremely common - it's just that parents and kids don't like to talk about it. Don't feel like you're alone.
Finally, this problem did not develop overnight - and it is impossible to fix it overnight. It will take weeks or even months to get better, but with consistent effort, a good bowel regimen, and a caring pediatrician, things will get better.
If I have answered your question, please click ACCEPT. And if I can help with anything else in the future, please do not hesitate to ask.