Erasing device after connecting to computer

Am looking for a program that if your mobile phone device to a computer USB connection or in the car with the on-board computer that the device erases its own. It should be for devices with graphene os.

This kinda does that: GitHub - levlesec/lockup: A proof-of-concept Android application to detect and defeat some of the Cellebrite UFED forensic toolkit extraction techniques.