I\'m having troubles with ghostscript 9.10 apparently removing content outside of the crop box (specifically the crop marks I\'ve put there)
This is the PDF before using
The first thing to understand (I know I keep mentioning this, but people don't understand it) is that Ghostscript and pdfwrite are not simply twiddling with your PDF fikle.
The input PDF file is interpreted and the PDF marking operations are converted into internal graphical primitives which are then passed through the Ghostscript device interface. In general these primitives are then rendered to a bitmap. In the case of pdfwrite, the primitives are reconverted into PDF marking operations, and a brand new PDF file assembled from them. The output bears no relation to the input, other than its visual appearance.
So when you process your PDF file with Ghostscript you are not 'optimising' it, you are creating a brand new PDF file.
In your case the objects outside the CropBox are not interpreted (because they are outside the CropBox, they are cropped). As an obvious result they are not passed through the device interface, and therefore not present in the output PDF file.
Note that while Ghostscript crops to the CropBox, that doesn't affect the MediaBox, so the media is still the same but cropped objects are cropped out. You can use -dUseCropBox to alter the media to be the same as the CropBox, but that's not what you want.
Right at the moment I can't see where the CropBox is converted into a clip, so your best solution is probably to create the file without a CropBox (or remove it, or set it to the MediaBox) and then add it in using a pdfmark when processing the file.