NOOOOO dont kill it.
What you want to do is this: kneel in front of the catflap with your ass facing it, when the cat pokes its head through just take a s*** on its face, then grab the cat and rub its nose in it like you would a puppy.
The cat will then regret its actions.