That's so great about your granddaughter and their pug!!!! At least she was right there when it happened.
I did a successful Heimlich on a very young pup not long after starting to eat really squishy food, but was too late finding him passed out...although it was only a couple seconds...and we lost him anyway due to oxygen depravation. It doesn't take much for something bad to happen, and you only get a few seconds before that window passes.
I love these little miracles!!!
I am so happy that your gd was there, level-headed, and so well prepared, and that everything worked out so great!
Our very, very best to you and yours for a very happy future!