They are very similar and they present a very similar dissociation structure, therefore related.
There is consensus about DID being caused by severe traumatization. Complex trauma is severe and/or prolonged traumatization. One of the main characteristics of complex trauma (Developmental Trauma more specifically) is the fragmentation of the psyche due to the peritraumatic dissociation and the alterations that happen further. If we all have parts, people that suffer from trauma have more severe separation among parts. The extreme of this phenomenon is when there is amnesia between the parts or fragments, which is the main characteristic of DID.
I agree that they should be seen as part of the spectrum of trauma but they are still separated in the DSM-5. Yet, this new version added a dissociative manifestation of PTSD that seems very similar to DID.
Dissociative Identity Disorder and Complex PTSD have many similarities, and certain symptoms or factors are common in both:
self-injury/self-mutilation, in DID this is more common in women/girls than in men/boys
frequent suicidal behavior/suicidality, 70% of people with DID have attempted suicide
alterations in attention and consciousness (e.g. dissociation) - a core symptom in both conditions
child abuse is a known cause of both Complex PTSD and DID, but not the only possible cause many comorbid disorders, especially depression, anxiety and substance abuse (drug abuse)
borderline personality disorder co-occurs in around 33% of people with Complex PTSD and 30-70% of people with DID
risk-taking or high-risk behavior
interpersonal relationship problems may be a Functional Consequence of DID
feelings of shame, which may involve underreporting symptoms (especially in DID)
revictimization: experiencing violent or abusive relationships, including in adulthood
somatization - physical illness or problems which are medically unexplained - a core symptom in Complex PTSD Unexplained neurological symptoms are particularly common in DID, including non-epileptic seizures, Conversion Disorders (e.g., paralysis or sensory loss), and Somatic Symptom Disorders.
body image distortions: In DID this may be linked to different identities; "Individuals may report that their bodies feel different (e.g., like a small child, like the opposite gender, huge and muscular). Alterations in sense of self and loss of personal agency may be accompanied by a feeling that these attitudes, emotions, and behaviors—even one's body—are 'not mine' and/or are 'not under my control'."
the core PTSD symptoms (required in Complex PTSD): avoiding trauma reminders, re-experiencing trauma, negative thoughts/mood linked to trauma, problems with hyperarousal (e.g., being irritable or jumpy, sleep problems); most people with DID develop PTSD.
The point you make in your question is really good. They should be seen as belonging to the same category. That could standardize treatment. Yet, the main advocates for that not to be the case are the individuals that consider themselves having multiple personalities without recognizing history of traumatization.
I think there needs to be more research including those who claim to be mentally stable and having multiplicity because is a phenomenon that may not be understood correctly.