Hi M.,
Let me just say this: the bigger an issue you make of this (like long talks, counseling, anything to focus his mind on it) the longer you may have this problem.
He's *proven* he can be continent (control his bowel and bladder) for months at a time. This is a "behavior."
I understand you tried making it an "issue" and making it a "non-issue," but what about making it an "expectation?" I "expected" my 2.9 y.o. to use the potty when I was training him, he wasn't perfect, and we still have an occasional "accident," but he got it: we use the potty, not our underpants. (And my son is VERY scared of public toilets.)
You have the right idea, and you're doing great recognizing that your VERY smart son is trying to see who's in charge. You be his Mama!
:)
T