Of course, “cat” in reference to a person became a favorable term in many circles somewhere along the line, particularly to the “cool cats” of the beat generation. Though women still don’t want to be known as “catty”.
I have observed that cats that live together will copy other’s behavior. For example, if one suddenly cat chooses a certain chair to sleep on, another cat in the household often does the same thing. I have no idea if this is the origin of the phrase, but I do see cats copy one another’s behavior.