I know there are other posts on this, but my dog's situation is slightly different.
I have an older dog (10-year-old chihuahua mix) and a newer child (5). The dog weighs 10 pounds and likes his space. We have a "room" set up for him where he can get away and not be bothered by her. We have told her "stay away from the dog", "never put your face in his face", "leave him alone or he will bite you", etc etc. They are for the most part supervised at all times. We don't let her play with him beyond fetch (which he loves).
He never provides any warning. One moment he's calm as a cucumber, then next he snaps and bites her. There is no growling or tense behavior. This makes it very difficult to anticipate. The only pattern we have noticed is he will be snuggling with my wife calmly, and my daughter comes up and gets too close to him when he feels like he's "bonding with my wife" he will snap. This has happened 3 times now and while my daughter has not been seriously injured due to his size, he is not providing any warnings so we can step in. No growls or even warning nips. He bites with the intention of harming her.
We have another non-aggressive dog who is wonderful with our daughter and they play often without any issues, so 99% of the time my daughter plays with the "fun dog" and leaves the other alone. However we want to correct the biting dogs behavior. Everything I have read online is about not bringing a biting dog into the home, or standard stuff we have already tried.
In 2 years we have had 3 incidents. He's not a bad dog the majority of the time, and usually just spends his time in "his room" where she cant get to him, and even when he's out running about she normally leaves him alone and he leaves her alone. It's not even that he doesn't like her. He runs up and gives her kisses when we get home every day.
He has some social issues, and major fear of bigger dogs, but we have done a lot of training with him. It's difficult to correct fear based behavior with positive re-enforcement. Even my daughter has him do tricks and gives him treats. My daughter also feeds him every day to establish positive bonds.
He really does not like outsider dogs either, but we have a big backyard that is fully fenced and dog door so he gets enough exercise, and we play fetch (he's exceptional at it) every day.
I don't want to euthanize him, and I think it could be challenging to re-home a dog with a bitting history. We want to be the best dog owners we can, but bitting is not okay.
Any advice would help.