It is indeed Heinlein, from 'If This Goes On'.
TL&DR version -- the term they use is: "connotational indices"
It's from when Johnny and Zeb are discussing the upcoming plans:
'Do you seriously expect to start a rebellion with picayune stuff like that?'
'It's not picayune stuff, because it acts directly on their emotions, below the logical level. You can sway a thousand men by appealing to their prejudices quicker than you can convince one man by logic. It doesn't have to be a prejudice about an important matter either. Johnnie, you savvy how to use connotation indices, don't you?'
'Well, yes and no. I know what they are; they are supposed to measure the emotional effects of words.'
'That's true, as far as it goes. But the index of a word isn't fixed like the twelve inches in a foot; it is a complex variable function depending on context, age and sex and occupation of the listener, the locale and a dozen other things. An index is a particular solution of the variable that tells you whether a particular word is used in a particular fashion to a particular reader or type of reader will affect that person favorably, unfavorably, or simply leave him cold. Given proper measurements of the group addressed it can be as mathematically exact as any branch of engineering. We never have all the data we need so it remains an art-but a very precise art, especially as we employ "feedback" through field sampling. Each article I do is a little more annoying than the last-and the reader never knows why.'
Zeb gives a basic example:
'I'll give you a gross case. Which would you rather have? A nice, thick, juicy, tender steak-or a segment of muscle tissue from the corpse of an immature castrated bull?'
Johnny then indicates that he could see how it would work on others, but not him. Zeb, of course, rises to the bait:
Now I should know better than to drop my guard with Zeb. The good Lord knows he's tripped me up enough times. He smiled at me quietly and made a short statement involving some of those taboo words.
'You leave my mother out of this!'
Zeb then calms Johnny down, and explains:
He did so and we sat down again. I was still sore and not at all inclined to forget Zeb's unpardonable breach of good manners, but the crisis was past. But he spoke quietly, 'Johnnie, believe me, I was not insulting you nor any member of your family. That was a scientific demonstration of the dynamics of connotational indices, and that is all it was.'
'Well-you didn't have to make it so personal.'
'Ah, but I did have to. We were speaking of the psychodynamics of emotion, and emotions are personal, subjective things which must be experienced to be understood. You were of the belief that you, as an educated man, were immune to this form of attack-so I ran a lab test to show you that no one is immune. Now just what did I say to you?'
'You said-Never mind. Okay, so it was a test. But I don't care to repeat it. You've made your point: I don't like it.'
'But what did I say? All I said, in fact, was that you were the legitimate offspring of a legal marriage. Right? What is insulting about that?'
'But'-I stopped and ran over in my mind the infuriating, insulting, and degrading things he had said-and, do you know, that is absolutely all they added up to. I grinned sheepishly. 'It was the way you said it.'
'Exactly, exactly! To put it technically, I selected terms with high negative indices, for this situation and for this listener.'