I am concerned, and haven’t seen anyone else point this out yet, that Musk will move Grok’s CSAM generation capabilities to space to be beyond the reach of terrestrial policing. Does this create some sort of legal loophole here so Musk can do this with impunity?
No. For one, things in space are under the jurisdiction of the country they were launched from. For another, it's people that do crimes, not satellites or LLMs, and the people involved in making CSAM are all on Earth.
AFAIK he can do whatever he wants in space, but CSAM is still illegal to view or even download in most (all?) countries of the world. So unless the degenerates also move out into space (which I'm sure they're eager to do), it wouldn't really ease the legal situation here on Earth.
Maybe if Elon launched himself and the dev team into orbit and didn't use any ground stations and just Starlink terminals he could start getting into legal loopholes.
At that point, country could just sanction the company, so that it's illegal for its citizens to pay them any money. Seems like a standard thing to do to a company that breaks laws and that you cannot otherwise reach.