Not even a trait - it's intrinsic to the Reaction (every Reaction or Free Action in pf2e has a "Trigger" listed; some monsters just happen to have Reactions whose trigger is crit-failed attack against them. I think there might be a player ability with a similar trigger?)
Yeah, at the very least Duelist-build (read: one-handed no shield) fighters can get Dueling Riposte, which is a reaction to Strike or Disarm when an enemy critically fails a strike against you
Actually, Two-weapon fighters can also get roughly the same thing a couple levels later, and shield fighters can get a different reaction (reflect a crit-failed touch attack back at whoever crit-failed it)