In theory, in Hungarian law under the Penal Code (Büntető Törvénykönyv), there are seven enumerated general grounds for exclusion of culpability and an additional blanket for situations codified elsewhere in particular.
"§ 15. The punishability of the offender or the criminality of the act is excluded or limited:
(a) juvenility,
(b) pathological state of mind,
(c) coercion and threats,
(d) error,
(e) legitimate defense,
(f) inescapable necessity,
(g) authorization by law,
(h) any other reason provided by law."
Paragraph (e) inescapable necessity seems the most plausible defense one may make from this list should one engage in the conduct of OP's facts' pattern. These two, along with (g), are "objective exclusions" meaning culpability is excluded in its entirety, and not subject to limitation. Each of these are defined in there own respective Sections of the Penal Code.
The former legitimate defense is analogous with self-defense laws in the U.S. generally in the exceptions that it is broader protecting others and property of others, too.
[Inescapable necessity]
§ 23. (1) Not punishable shall be the act of one who is protecting one's own or another's person from imminent and otherwise inescapable danger or who is acting so in order to protect the public interest, provided that the act does not cause greater harm than that which one was trying to prevent.
(2) May not be punished he who causes greater injury than that what he sought to prevent because, out of fright or excusable impulse, he does not realize the extent of the injury.
(3) No inescapable necessity shall be construed for the benefit of whom who is responsible for causing the danger or who is required by his occupation to assume the danger.
This is, of course, all theory. In Hungary, it's a matter of who you know, and not what you know. If you have good connections, you will have these rights because they are enumerated, and someone whose someone's someone will plead it for you, and the judge will nicely nod.
Rights are not commodities in Hungary.
But do note: The statute, despite its archaic linguistic constructions if translated as authentically in all aspects as possible, it reads much more progressively than blanket "qualified immunities" of the police in the U.S.
By the statute, a cop would face criminal charges under any circumstances if they harm a citizen since their occupation assumes the danger regardless of imminent or otherwise inescapable danger.
But then again, Hungary does not operate under the rule of law. They are enumerated for the privileged who are hence untouchable (see above), everyone else will get no justice. Including by asserting "inescapable necessity".
In a case like this, make sure you call your embassy, and get them get you a lawyer, and pay any money that they tell you is reasonable or any other "fees"...