The problem with this is that it ends up being a matter of one of two things.
1) An intelligence roll to know the thing, then being lucky to have that thing either on you or nearby.
2) Pre-planning to fight a known threat, putting forth their weakness and guaranteeing a victory with few to no stakes but.
I've run into this with Vampires. Vampires can be incredibly tough and difficult foes, worth that CR 12... unless you have sunlight, in which case they fold like wet paper. So any group not in the "we may die even considering this fight" camp, can pretty easily wreck a vampire the moment they can expose them to sunlight for multiple rounds.
Hmmm. This sounds less like an argument that making mundane expertise work isn't feasible than like a couple of cautions to the GM or adventure designer:
1.) Make learning about monsters more interesting than just a die roll; and
2.) Make preparing countermeasures more than a matter of blind luck.
There's a well-known body of techniques for #1 because it's essentially just turning the monster into an instance of the "mystery" game structure: instead of being able to "roll Insight" to "detect the murderer" in the first scene, you need to follow leads to gather clues and consult experts and winesses until you have a answer. (Hopefully the correct one!)
Let's say you've got an adventure in which part of the scenario "requires" (for sake of Internet discussion I'll make this a bit railroadey but that's just to keep discussion simple) that the PCs neutralize the horrific mindwarper Dr. Horrible who holds the East Tower. If they either talk to the townsfolk who sell him orphaned children or interview the poor messenger boy whom Dr. Horrible uses to deliver his occasional ultimatum or take alive and interview some of the assassins whom Dr. Horrible will eventually send to test their mettle for his own amusement, they'll learn that Dr. Horrible eats brains using tentacles on his face, smells of death, and never sleeps. If they either resurrect Doctor Van Helsing from his remains in the cemetery, find Van Helsing's notes hidden in Musty Basement #3, or (forgive me if this is a poor example--I'm not saying this off-the-cuff example doesn't need workshopping) visit the wizard Merlin looking for advice, they'll learn that illithid liches eat brains from tentacles on their faces, smell like death, never sleep, and (like other mind flayers) flee in fear from the sound of a rooster crowing.
So now the players have a choice:
1.) Take a live rooster with them on their attempt to neutralize Dr. Horrible. Time their assault to happen around dawn, and/or have some way to make the rooster crow when it's not dawn (sunlight spells? Animal control spells?). Don't let monsters or traps kill the rooster before doing its job.
2.) Try to fake it with an illusionary rooster? Maybe test this out in advance first by seeking out a regular mind flayer and seeing if this works on it. Do the players have time to do this testing or will they just try it on Dr. Horrible and hope for the best?
3.) Brute force: kill Dr. Horrible and his minions using action surge/Sharpshooter/etc. as if the rooster information didn't exist. Or die trying.
If they bypass the "mystery" of seeking information and jump straight to #3, they may have a Deadly x10 fight on their hands, but they don't have to "get lucky" on an intelligence roll or in having access to a rooster. If they go the mystery route, they don't have to get lucky on an intelligence roll either. They may require some luck to keep their rooster alive if they go for #1, and it probably won't "[guarantee] a victory with few to no stakes" so much as it will change a Deadly x10 fight against Dr. Horrible + minions into a Hard or Deadly fight against minions only, but you were presenting a guaranteed victory as a bad thing anyway.