My heart went out to you when I read your message. Probably as I identified similarities with my family, my middle son who started having poo accidents, he is younger but none the less anxious I think due to poor parenting from me when he was potty training. I had a young baby at the time and struggled a bit, but I am still feeling guilty over this stage, but I have been very open and affectionate with my boy since, about my mistakes, telling him I was sorry etc and things have improved over time. Childeren are more perceptive and forgiving than we think.
I think there is a good chance that he has unconsciously absorbed negative vibes around going for a poo. You can probably help by very gently talking to him, when he and you are calm and relaxed, perhaps set aside some time where you can be physically close, snuggly and then broach the subject. Parents make terrible mistakes sometimes (it could be your ex-partner had a rough time potty training himself), I think we mums get used to quite a bit of poo and so less uptight about it.
Do you and/or your son have contact with Dad? From the overall tone of your message, instinctively I would say your boy is crying out for Dad or a Dad figure! Boys really need their fathers around this age for love, attention boundaries, all of it. If possible (relevant) it would be good if you could talk to his father about these problems, and help him to acknowledge his part in it, thereby helping to heal. - Its never too late! ( It might be that your ex is not someone you feel is good for your son, and not wish him involved in your lives, as painful as that is, we are all different).
You mentioned a volatile relationship, which can be frightening for all, but especially children. Emotions, good and bad are all part of our amazing biology, but a lot of our primitive emotions are irrelevant and unhelpful in our relationships - learning emotional control is a really valuable life skill, arguably the most important.
I see you feel guilty., but God we do this all the time as mothers, but we can help, and its never ever too late to help our kids.
Does your boy have a good relationship with your new partner? Can you speak to him and encourage him to start to spend some time, even just short periods, shared interests, or running errands together -
cycling ?!
Having a new baby sister is obviously a big change for him.
Now is the time to invest in your son, pay him attention, set aside the time, even just for short periods to listen and just be.
I would think about limiting screen time ( hard for all of us isnt it?!) but I notice a real difference in my children when we say, no screens, books, drawing , hanging out while I cook, whatever. I am convinced is isn't got for their developing brains (hence behaviour).
Lastly, (gone on a bit but I hope it helpful) you mention Diabetes. Could there be any side effect that causes him constipation ( and then associated withholding..ie hard poo, hurts when he goes, therefore avoids going, but the build up in gut (obviously) leaks round the hard poop and causes the soiling ?
How is his diet generally, good ? It helps to feed kids as wholesomely as possible, but I am sure you know this, although blimey its hard to get inspired sometimes, but get in the soups, stews etc now, pack full of good veg and this should help.
The emotional connection with food is very important - If you can be relaxed around cooking (or your partner, mine doesn't sadly), and in the kitchen etc, and even invite him to help you, chopping, stirring , unwrapping and adding a stock cube :)) all great life skills and opportunity to hang out together. Kids are watching and learning all the time.
I think I would not worry too much about the other behaviour, I think it will improve with emphasis on positive behaviour - ask him what he likes to do and listen! (No no screen time!) they're busy creatures boys I notice, he probably needs more physical outlet, almost certainly, but that is harder on you with the tiredness (baby), you might find a walk out with him is invigorating, it lifts me sometimes more than a coffee.
wow, gotta go, I wish you well
ps I really rate Steve Biddulph on boys, book and follow on FB , Mindfulness is worth looking at for emotional matters x