It's a simple check:
On initiating dialogue with normal NPC
If Monster in party = very yes
Then NPC reaction = "AHHHHHHHHHHHHHHHHH!!!!!!
You don't need to modify every NPC in the game, just have it so that the game checks before you initiate dialogue what's going on.
On doors for large creatures you just give it a value where it accepts a large creature or not, and, if that value is false, the game says you cannot enter since a member of your party cannot fit.
It doesn't have to be a horrible amount of programming if you have an efficient system to begin with.
I take it you never did scripting for BG or NWN, right?
If you did, you'd know better.
On another point is that the only reaction there will be?
(unimportant) NPC fleeing? Surely that makes the companion tottaly balanced!
Large creture cannot enter? How do you do quests taking palce indoors then? You'd have to switch companions constatnly. And I'm willing to bet that would case a lot of player rage.