I totally understand what you are going through. My middle child didn't potty train until 3 1/2. We tried everything. Here are a couple ideas:
if he is scared of using the potty and only feels secure to go # 2 in his diaper then you could try making him sit on the potty while pooping in his diaper. I've heard of people doing that and eventually cutting a hole in the diaper, then taking the diaper completely away. I never actually tried this idea.
If he isn't scared then my suggestion would be to throw ALL diapers away. Get them out of his reach. Be prepared to stay home for atleast 2 days, possible all week. Every time he has an accident, bring him to the potty and make him go through the process of pulling down pants, sitting/standing at potty, flushing, washing hands. Try to go through that process 3 times in a row. He doesn't actually have to use the potty. He will probably resist the process, but make it a happy learning experience. Then go back to where he had an accident and say something to the effect of, this is the wrong way, (bathroom is the right way). Then later on, when you know that he is dry, check his underwear and make a big deal about him being clean!! Give him one thing that makes him happy (m&m, toy, short movie, whatever). As frustrating as I know it is, try to keep this week as happy and exciting for him as you can. Just BE PERSISTENT!! He can do it!! Good Luck!!
Oh, an idea I got from a friend that is really helpful during the night is to put on a plastic cover on his bed, then the fitted sheet, then another plastic cover and fitted sheet. This way, if he has an accident, you can pull the top layers off and his bed is ready. I like to get back to sleep as soon as possible!!