As visible in the attached screenshot, Compactors apparently don't attack Golems.
This one was capable of going as far as fully integrating a weapon before dying to corruption!
I'm guessing this a is bug with the faction system.
Good thing i (accidentally) found that out in my adventurer mode bug-seeking run, would've been annoying to try to drop a GOLEM Unit to distract Compactors with no effect in a more serious run.