That's very tough, OP, but it will get better.
We had this with DD1. She only finally stopped soiling her knickers at age 7; she only did it on and off, but it was getting more extreme. She would hold it in for 3 days then it would trickle out and she didn't realise she was doing it. We would have so much difficulty getting her to sit on the toilet to do a poo. She was regularly constipated as well.
I did some research and discovered a condition called encopresis. It's what happens when children get anxious about their poo and it comes out without them realising it. We were about to go on holiday and in desperation I took her to the out of hours doctor and he prescribed her Movicol.
I also followed the advice I discovered online and you might find this helpful. We made DD1 sit on the toilet for 10 minutes after breakfast and after tea. I encouraged her to take a book with her, which I often do myself. (She still does that lol.)
Anyway, she got used to the routine. The Movicol lasted for 2 months. I was then worried that she would regress and she did a couple of times. But she hasn't since she turned 7 and she's now 8 and fully in control, no more accidents.
Hopefully it won't go on as long as that for your DS, OP. I was able to help my DD1 turn things around when I understood that she wasn't doing it to be awkward or because she was lazy. There was a genuine reason why she was doing it.
Patience was the key, I found, and finding the strategy that works. You'll get there and, more importantly, your DS will.