The compresor in Corollas after 2008, PKDM ones are made in Pakistan, Usually ive heard they fail as soon as 1 month old cars.
Althou this is just what i have heard, In my case our Corollas Condensor leaked, I got it replaced and faced the Compresor tripping issue after that. Someone told me that oil you have put is not the right kind for this compresor that is why this happened.
I have however changed my cars compressor with a brand new one but of a 8th Generation Corolla (without sensor with clutch i guess).
Someone on Pakwheels mentioned that Corollas are prone to this issue and it is caused by a weak relay or coil, Il try to find the thread, That guy claims changing the relay or the coil can fix this issue easily.