ejectItem is only defined in the player entity. It won't work for anything else.
(So far as I can read this code.)
So you should be able to force a player to eject a particular item: "Your illegal cargo will be ejected! Stop moving and do not evade our lasers!"
But it's not defined for any other entity. That would be a worthy addition, if anyone takes up Giles' mantle. (Don't look at me! I don't understand this crazy language. Besides, I'm already doing too many other things.)
And, after more code-surfing, littlebear is also correct that escorts get set to escortAI.plist in the code for setUpEscorts. They also get set to state "FLYING_ESCORT" immediately.
Thanks Judebert. I've stopped working on that OXP for the moment - I did manage to get the escorts working to my satisfaction, but, as you say, there's no solution to the Q-bomb thing. So I'm going to wait a while, and hope that we have a new Giles soon...