Dear M.
My sister gave me the best words of wisdom on the potty training issue. "Do you know any healthy adults that poopy in their pants on a nightly basis?" I bet that answer is "NO!"
Relax, if he is pooping in his diaper nightly his bowels are moving so you don't have to worry about anything physical being wrong,if you're in doubt take him to the Dr.
Think of it as a control issue. As a child he has no control over anything in his life. We control everything; what they eat, when they eat, what they wear, when to go to bed, when to play etc. Finally, here is something he CAN control. Try to give him some control over issues that affect him, that may help him feel more relaxed in turn.
Set him up to win. Perhaps you can allow him to choose the time he goes to the potty. Don't reprimand him if he doesn't have a bowel movement. Just say its OK and we'll try again later. Give him a warm bath after a meal and try the potty then. The warmth helps them relax and he's more likely to be successful. I remember giving my twins lots of fruits and Kefir after a big meal. For some reason that always got them to go if followed by a warm bath.
I hope this helps. I do know that when I let go of the potty issue my twins boys both started going more on their own. One of them seemed to have an "Aha" moment when he realized that it was easier for him to just poopy than to struggle to hold it all the time. He never poopied in his diaper again. The other one continued to poopy in his diaper at night but slowly became more aware of it and started to dislike it. I would comfort him and remind him that if he poopied during the day he wouldn't be crying now. They didn't set any speed records for potty training, but our lives where so much better when it wasn't a focus.
As for the night time thing I'm not sure I have any advice other than get rid of the TV. It sounds like you're doing everything else. Try the reward system, it has helped me alot in getting my twins to behave. They think its a game at this point so don't engage. Be all business; get them back to bed no extra kisses, hugs, or snuggles. My twins are 4 and share a bedroom and at times I do have to threaten with time out or to take a toy away. I also found that they'll go to sleep sooner if their room is darker, just one little night light.
Good luck!