In D&D 5e, there is a section in the DMG (page 235) that discusses "Metagame Thinking." Taken as a whole, it's an injunction to remind players not to make uninformed decisions that lead to a bad outcome. The examples it cites are players thinking that "the DM wouldn't throw such powerful a monster at the characters" (presumably leading to their unexpected demise when the players decide to fight it) and players believing that the time spent on the description of a door necessarily means that it must be important (presumably meaning the players waste time investigating it).
What the DMG doesn't say is that doing so is in any way a violation of the rules. But the smart play is to use in-game actions to verify one's assumptions before acting on them.
Thanks for the direction. I did go back and check this morning and for the record it does specifically call out ‘player knowledge’ as the example which you have quoted above.
The same section also also suggests that the DM modify the campaign to fit the party’s particular power.
“You can curb metagame thinking by setting up situations that will be difficult for the characters and that might require negotiation or retreat to survive.” - DMG 235
In order to do this the DM has to critically decide what their particular groups strength is and adjust foes accordingly. You can use a Balor to remind the party to run away but if the party is made up of paladins then a Balor might not be the right choice. To do this effectively without being unreasonable the DM has to use their knowledge of the party.
The DMG also echcoes the point I was making in the section Something for all Players.
“An adventure needs to account for all the players and characters in the group, drawing them into the story as effectively as possible.” DMG page 71.
It also discusses published adventures
“You can make adjustments to a published adventure so that it better suits your campaign and appeals to your players...” on of the examples it gives is to “add something to the background of the adventure so that it involve your player’s characters in what’s that the adventure’s designer never could have imagined.” DMG page72
I agree that checking with experienced players about what their expectations are going into the campaign is a good call. If I expected a game like PMing’s which is a strict ‘what will be will be game’ with foes mapped out in advance and written in isolation and get me as a DM then that could cause a problem. To be clear though up to this point a lack of comms between players and DMG has never been discussed. Only that some styles of DMing are inherently different.
[Edit] Great advice on page 6 of the DMG. A whole page of suggestions for how to design or modify an adventure to keep your players interested and immersed. Full of ideas for how to tailor adventures to your players.