Name changed for this as people on here know me irl but I've been around for ages and promise I'm not a weird poo perve.
DS is nearly 6 and just started school this September. He's been fully potty trained since he was about 2.5 (I think, around then anyway) with no issues.
He's just started pooing himself everyday! Sometimes twice a day. It's been about 2 weeks now. We've been very gentle and understanding but yesterday it ashamed to say I got pretty angry with him. I realised he had poo all over his hands and clothes and was just carrying on as normal! He got really upset and obviously I felt like a very shitty parent. 
He's also been hiding his pooey pants in places.
Today I got a call from his teacher, he's done it at school. Is this something I should take him to a doctor about? Could it be a physical thing? I yet can't see how or why it would be psychological.
The other kids are going to start to notice, it's a small community, people remember things kids did 30 years ago. He'll forever be the kid that used to shit himself. 
Anyone ever experienced this? Ugh. My patience is wearing really thin with it but I want to be as gentle as possible, going in full steam clearly won't help, especially if it isn't a medical thing.