This seems to tick a lot of boxes with the Superman crossover comic serial "Panic in the Sky"
Panic in the Sky
In the early 1990s, Brainiac returned in the "Panic in the Sky"
storyline. He seized control of Warworld and manipulated Maxima into
assisting him. Then he brainwashed Supergirl and the alien warrior
Draaga before capturing Metron and setting off for Earth.
Orion and Lightray of New Genesis attacked Warworld, but they were
quickly taken down by Maxima and Supergirl. Brainiac sent the mental
image of the New Gods captured to Superman in order to taunt him, and
he also sent his "headship" (a green-hued variant of the pre-Crisis
skull-like ship) to Earth in a punitive expedition.
These acts prompted Superman to go on the offense rather than wait for
the inevitable invasion. He gathered a coalition of most of the
world's superheroes and launched a preemptive strike at Warworld
before it could arrive on Earth.
A small, elite force was left behind for any scouting forces that
would be sent ahead. Superman led the attack on Warworld, where
Supergirl and Draaga managed to shrug off their brainwashing and rally
to Superman (although Draaga was killed in the fighting).
Brainiac briefly took control of some of Earth's heroes, but it was
not enough to turn the tide. Maxima would shortly switch sides in the
fighting too, perceiving Brainiac as the true villain at last. Flash,
Maxima, and the Metal Men attacked him in his lair, where Maxima
managed to lobotomize him (but was stopped short of killing him). His
vegetative body was taken back to New Genesis for observation.