Yeah I'd probably tweak the info you can get a little... I'd probably base it on a dice roll (Insight??) so as not to put that in the hands of the DM. Specifically calling for a HIDDEN dice roll because I wouldn't want the player to know they might be wrong if they roll low.
I'd put it fairly early too in the level progression compared to the 7th level of the Battlemaster, I feel it would help set FIGHTERS apart from random NPCs who 'happen to fight' like a city guard or militia footman.
I think I'd go a step further and have it that even city guards or ordinary soldiers might be able to recognize when they're severely outclassed in the fighting department. A 1st-level Fighter would probably be able to recognize whether or not others are in a martial class, though maybe not get the exact class correct; and by say 4th level can more or less size up in general terms someone's capabilities.
if the Fighter is the Best at Fighting, I can totally see it warping the way they perceive the world. Always doing threat assessment and thinking on how to not be taken by surprise. They should probably get Alert later in levels too.
Maybe, but I'm not sure I'd make it quite that universal. They'd all* get the baseline recognition piece right from day one but anything further might need special training (or a feat, if one uses such) or be a feature of just one or two subclasses.
I'd also really like to leave Alert as a Ranger and maybe Rogue thing, as part of their niche.
* - all single-class only. This would be one way to make single-class Fighters more appealing, that they get perks like this that multi-classers don't; and as a side effect it means one can't dip into Fighter just to get this ability. Every class should have things like this, that you only get if you devote yourself completely to that class.