M.P.
Wow! you've listed several possible medical and emotional issues for him not pooping in the toilet. It's good that you are working on finding out if there is a medical reason. If there is not a known medical reason try just being neutral about the whole thing. No rewards and no punishment. You said you think it could be a power issue. So let go of the power. Give him all the power he wants and needs. Leave it up to him when he's going to poop and what he's going to do about it. If he poops in his pants, difficult as it might be, ignore him unless he asks for help. At 10 he can clean himself up. At the same time reassure him that you know he can handle this; that you're there to help him if he asks but otherwise you trust him to take care of it.
My step-son frequently stopped up the toilet with his poop when he was 11 or so. He found himself a stick and broke the poop up for himself. He didn't want anyone to know that he caused the toilet to over run. You could give your son a stick and suggest that he could take care of this himself, too.
Another possibility that may be a part of this is your son has learned that this is a way to get attention. Find ways to be with him doing fun things. Don't bring up the poop issue.
If there's no known medical cause and if you withdrawing your attention over the issue doesn't work, consider seeing an emotional therapist. There may be emotional issues related to his surgery or other stresses that are showing themselves in this way. A therapist will know how to get to those issues.
I say "no known medical" reason because I've found that sometimes there is a medical reason but doctors have not found it yet.
Compassion is the most important part of resolving this issue. It's difficult for you too just in a different way than it is for your son. You both need compassion from each other, for yourselves, and from others.