“If you happen to draw a hanging judge and a prosecutor with political ambition, and most of them do, you will find that they prosecute and sentence based on whether you could have reasonably and safely avoided the confrontation.”
That’s why there are juries of one’s peers.
Any honest lawyer will tell you to avoid court if you can because you never can tell what a jury will do.