Incredibly stupid, and he probably deserves to be prosecuted. He's actually lucky the deputy didn't kill him. But the proper response to the lawsuit is "motion to dismiss due to qualified immunity". He was acting on behalf of the IRS (I would say as an agent of the IRS, but that implies something else), and there's that sauce, goose, gander thing.
Immunity isn't absolute. Immunity only applies to a government employee if that employee was lawfully carrying out the duties of his position. If the plaintiff can establish that the defendant was acting outside the scope of his duties, beyond the scope of his authority, or unlawfully, the suit can proceed. Qualified immunity was intended to protect a government employee from being sued for doing his job. I will admit that I have been protected by that immunity, when I was sued by a criminal defendant for prosecuting him. He sued me for slander, defamation, unlawful imprisonment, and a few other things. Sought $5 million. Case got dismissed, but it sure screwed with my life for a few months. As an aside, it was a burglary case. Guy was caught in the act by the homeowner. Security camera had video of him running from the house to a car. Car was traced to his girlfriend. It was a slam dunk case.