Speaking as a former Prosecutor, I’d seriously consider firing the idiot that charged this and/or didn’t dismiss it.
This seems like a case of jury nullification; the man clearly did write on the sidewalk, making him factually guilty of the action he was charged with, and that is typically all the jury is allowed to consider - not with whether the charge fit the law or the law was reasonable.