Is it illegal to trick the US government into wiping your phone during a questionably legal search?

A Georgia man was charged with a felony for allegedly wiping his phone while being questioned by Customs and Border Protection.