i'm very sorry for the loss of your pug. Hugs going out to you and your family.
With your pug always growling, taking treats and food from the shepherd, it seems he was displaying dominant (and maybe even aggressive) behavior, just my opinion. I think the issue should have been addressed when those things started going on. Things were allowed to go too far. I'm trying to tread lightly because i'm sure you are very upset right now...
I would not under any circumstances let you child tug on ears, tails, etc. I think the shepherd was provoked and probably gave his fair share of warnings to the pug to stop with all the shenanigans. Not too sure more advice as far as for your kid, others can help with that.
Again, im sorry for the situation you are in.
*He is your friend, your partner, your defender, your dog. You are his life, his love, his leader. He will be yours, faithful and true, to the last beat of his heart*