Turn the cat in the pan

I know the meaning of this euphemism, but I do not know the origin or when it first came into use.

ES

What's the meaning? I've never heard this expression.

To turn the cat in the pan means to turn the situation around, a turnabout. To give one a dose of their own poison.

ES