Mmmmhhh... I was going to shout 'DCOP!'...
Still, DCOP should do the trick. I don't use Kate, so I don't know it's DCOP interface, but there should be a command in there to focus a window, I guess... Just try some more...
And use kdcop, so at least you won't have to type all the commands.