You can also grab the deepspace tracking station before the complex shuts down as well, but that doesn't stick around after the complex is gone.
Likewise, since this has come up, in the event that you want to prevent the ai from setting a CMC somewhere what you have to do is just put a dummy colony on the body in question. No CMCs will pop up on a body that already has a colony on it(though CMCs will obviously still expand as normal).