I train a replacement behavior, initially prompted on verbal cue, that eventually becomes their go to behavior instead of the mouthing.
I use kissy-kiss, which also sounds nice in public.
Awww, people say, look at the big dog doing the kissy command.
At first any non-tooth touch with the mouth is rewarded, and if that's what you want, you can stop there (a nudge, push, whatever). I don't know how but the dogs seem to get what I am saying so quickly I always end up with a "kiss" as the replacement for the mouthiness. Use a clicker and it will go super fast. You may need to find a clicker trainer to help.
Sometimes still a dog will use the corn cob nibble if they are super excited, in an effort to get around the no mouthing rule (hey my mouth wasn't even open, it was just a pinch!) but for the most part it's happy kissing, nudging instead of being herded by the mouth grab.