I had to respond to this as I am going through a similar thing with my daughter, 3yrs and 5 mths. Finally coming out the other side. It started at Xmas - for whatever reason she decided she was not going to poo anymore. She potty trained last June and had previously got the hang of the toilet. However she had always struggled to pass poos as they were always large and hard.
So, after Xmas she realised that she had the power to hold onto her poos, and that was it! We then got lots of messy pants, which was just overflow, where runny poo was leaking around the hard poo she was holding on to. This escalated quickly and got to the point where she went 4 weeks without passing a poo. Ultimately we had to use Movicol plus a laxative both prescribed by Doc to make her pass a poo the size of a grapefruit. The problem was not that she was classically constipated, but impacted, where a large stool is right at the base of her rectum, which then stretches the rectum to the point where she doesn't even always sense the need to go, and also had absolutely no idea poo was leaking out.
I have since seen a paediatrician who has been helpful and advised everything can be solved with just Movicol, which is a stool softener and a stimulant. I would strongly suggest you go to Doctor and ask for Movicol - it will be horrendous for first couple of weeks as you basically need to clear him out, so it will be runny and he wont be able to hold onto it. Then you start to (slowly) reduce the dosage of Movicol over the coming weeks/months, so you get to a point where he is doing a poo a day, and is not trying to hold on, as he will begin to realise it doesn't hurt when he goes.
You say he is in nappies - is he not potty trained yet? Personally if he is not, I would keep him in nappies while you sort the problem and fear out, then when he is not holding on so much, start the excitment of being a big boy in pants.
I really empathise with you as I nearly lost my mind for a few months, and flipped from ignoring the holding on (crouching in the corner going red faced) to dragging her to toilet screaming (not to be recommended!!), washing 8-10 pairs of sh*tty pants a day. Movicol has been such a relief, I really recomend it - I think this website is created by the manufacturers of Movicol: www.childhoodconstipation.com, its a good help.
Good luck, this can be so disruptive to your daily family life so I hope you can get it sorted.
Jacqui x