How do you break a grudge that a Doberman has held? My chihuahua was that way... never forgave my 5 yr old for hurting her.
I don't really believe that dogs hold grudges exactly, but Dobermans are very good at knowing what they don't like and outsmarting their people so they can avoid it. Griff hated long down-stays, so he got out of doing them by instigating the other dogs in the class. He'd stare at the other dogs until someone else broke their stay, then he'd start a round of chase me or bitey-face. He's a little snot when it comes to formal obedience and he loves instigating trouble with the other dogs. Which is exactly why I dropped formal obed and switched to Nosework.
And then there's the case of dogs avoiding things that cause them pain- that's not a grudge, it's straight up avoidance. Your chihuahua learned that your 5 year old can and will hurt her, and so it was in her best interest to avoid the thing that hurt her in the future. My first Doberman was the same way about brooms, because one of his previous homes hit him with a broom handle. It wasn't a grudge against brooms, it was the knowledge that brooms hurt him and he wants nothing to do with them.
You can help a dog overcome that aversion by creating positive experiences and reinforcing calm behavior. It's going to sound funny, but Logan had such a peanut butter obsession that I started off feeding him PB while I had a broom in the same room. Every sesson, we worked a little closer to his threshold (the comfortable distance between him and the broom), until he eventually ate PB off the broom handle itself. This also worked to overcome his fear of rolled up magazines.
So if you have a dog who's wary around kids, give them plenty of space and time, have the kid work with the dog to rebuild the trust that was lost. With a new dog, make sure that kids treat them gently and don't injure them. I brought treats on walks after I adopted my dogs, and any random kid who wanted to pet got to make my dog sit and then feed him treats. Griffin treats all kids as potential food sources now, and he's very polite around them.