In MMA, Mixed Martial Arts training, they tell you “It is better to be on Trial by Twelve (a court jury, for potentially breaking the law by defending yourself), than carried out by Six (pallbearers, carrying your casket).”
There was a common sense solution here, such as ramming the gate or making a U-turn. Sometimes breaking the rules is better than the alternative. Let the court decide, when you’ve done your best in good faith.