You have said in a post that this is the only issue, but I think that this is also an issue:
He's similar in other ways like walking if he doesn't want to walk, he doesn't. Even if it's somewhere fun like the park. He sits down and refuses to walk but it's not like he's upset because he's quite happy to sit on the floor, it's not like he's having a tantrum or anything. It's sort of a game of who'll give in first and it's rarely him. But then he'll be running about the park happily
As a parent you need to be in charge, the above will make your dc feel as though they are in charge, as you give in first, and this will be very distressing for them even if they don't indicate this in an obvious way in their behaviour or words.
I think that behaviour is communication and it sounds as though your dc is expressing upset by his need to be in control. Wetting himself might have become another control situation.
You need to parent and that means being in charge and teaching your dc skills, setting out expectations as well as providing significant support to enable them to do this, and in your case also helping your dc with previous trauma.
I think that as a pp said, your dc has suffered deep trauma in his early life, is this something you talk about with him? In an ideal world you would be getting help with this, but there seems to be a shortage of professionals who can help, unfortunately, hence the long wait, and so parents very often have to do it themselves, and they need to believe that they can do it.
You have to balance the fact that your dc needs a lot of help with trauma, with learning social rules and that means tackling some of this "strong will" business by being more in control yourself, being very supportive.
So, in relation to toilet issues and other issues, I think you need to firstly set out expectations and then give him support and understanding in following expectations. I say this as the doctor has said that there are not medical issues, and you have indicated that it might be a control situation. It would probably talk to him more about wetting himself at school and explain why it isn't a good idea, so explain how you want to help him with this to help him do what he needs to do at school, that you want him to be dry at school for his benefit, as it is expected.
I think that from this point on, how you and he talks about his feelings, about the world around him, how well he can identify his thoughts and feelings, is really key.
I think that he needs to feel he can talk openly about how he feels about everything, positive and negative, including about you and DH which may well be positive sometimes and not so positive at other times. It is what it is. I used to say to my dc about awful traumatic things "I can't change it or make it go away, but I can make it better". That was mainly by maintaining the connection, talking and helping them process things, letting them know that I had their back, and that I loved them unconditionally etc etc.
Schools and school parents can be a quagmire for anyone to navigate, so I think expect questions and don't be put off by them, all parents face problems of one kind or another and most parents feel at one point or another they are being judged.
However, this said, there is research indicating problems around raising children without mothers, or by single sex couples, as well as away from biological family, it is probably worth being aware of what all the research says so that you can try to make better the known problem areas for your dc as best you can over the years.