Without knowing the specific circumstances here it’s impossible to know if the Captain’s response was reasonable or not. To vilify him without this knowledge is unfair.
I’ve been clearly targeted by the ETD screeners on more than one occasion. Those occasions are few and far between admittedly. More often than not it’s just part of a “random and continuous” process as the regulation directs. I comply realising the guy is just doing his job. One I certainly wouldn’t want.
When it is clear crew are being targeted, I believe we all share the responsibility to highlight the issue. If that causes a delay so be it. Targeting crew is against the regulation and diminishes the effectiveness of the process as crew are a low risk group to begin with. While the crew member concerned is being screened, 3-4 others pass through security unscreened.
Any standard you walk past is a standard you accept.