@dobbledo have you ever had any support or training for handling PDA?
There are loads of resources available on the NAS website. CAMHS and social services should be able to direct you and refer you to NAS courses (they did for our family). And if you google it, you can access resources and on-line courses? With PDA you cannot just demand that a child puts his PJs on - the fact that this isn’t blatantly obvious to you suggests that you haven’t been counselled or supported to understand what it is or how to manage it. You actually say ‘it’s nearly bed time, do you want to put your PJS on now or when you go to bed?’ Both achieve the same result - putting his PJs on for bed. But ‘demanding’ and the getting a defiant response - which you then counter with defiance also - is a predictable scenario.
TBH, knowing that ND-ity does not arise out of nowhere and reading both your responses on this thread but also in that PJ situation, and I think the core of your family’s issues may actually be that you, too, are ND with PDA. Pretty much everyone in my family, going back several generations, is now or was formerly diagnosed with an ND (autism, ADHD, AuDHD, dyslexia, hyperlexia, dyspraxia - usually in combinations of the above - many with PDA elements and RSD, ARFIDS, EDs etc). I think that what you may need is really family support, exploration of your own and DH’s ND/NT profile and help in navigating this as a family where every single family member’s needs are met. You are currently rushing headlong into a common scenario where a couple divorces and the children are separated - ie your DH could eventually walk and take the elder child with him because it is the only way to safeguard him. I’ve seen this several times in the last 10 years.
However, here is one resource that may help in the short term, if only to show you what ND/PDA orientated parenting support might offer:
https://queensonlineschool.com/pathological-demand-avoidance-strategies/?
Having grown up in a complex, chaotic ND household I was ill-equipped to parent, and even less so when presented with a challenging ND child (well, two). The way we got through it was by not burying our heads in the sand but, as a parent couple, contacting every agency, the GP, the NAS, CAMHS, the Crisis Line, the pastoral and SEN leads at school, local ND parent networks - to ask for help and actively engage in the resources and training they signposted or arranged for us. You don’t have to do this alone - getting support is the most loving and proactive course you can take.