For too long now we’ve emphasised outward appearances: manners at the expense of truth. If your son likes the people you are meeting or visiting, he will say hello and goodbye without prompting, and he will say it with sincerity and feeling. If he doesn’t like them, he can still be polite, but don’t force him to be dishonest by making him pretend to a warmth that is not there.
Equally, if your son is delighted by a present he is given, his pleasure will be evident to everyone, including the givers, and their satisfaction will come from that. There is no value to anyone in an insincere or forced thank-you.