In my experience, one or two yellow jackets can't do much of anything, and the bees in a strong colony will harass and chase them out if one or two enter the colony during an inspection. They may steal a larva or a mouthful of honey, maybe kill one or two workers if they get into a serious fight, but that's all. If however, you have yellow jackets entering the hive in force, stealing honey and brood and the workers aren't strong enough to stop them at the entrance, then yes, they can absolutely kill a queen. But I really wouldn't worry about one or two jackets during an inspection.