Conservation of energy doesn't torpedo this idea a priori. The "exhaust" mass would steal energy from the massive body/planet in the gravity assist.
If you do this a million million times you might slow the planet down to where it has no more energy to usefully donate, but a one-off maneuver is negligible.
Actually I am thinking of the EMDrive thing now. Would that be possible?
Isn't EMDrive thoroughly debunked by now?
No. Fails to account for the conservation of momentum nor does provide an explanation for why it doesn't apply.
The EMDrive thing was just measurement error. It's not providing any thrust.