I am the mum's boyfriend and I have been in the little boys life for about 2 years. We have a good bond, although I don't live with them and see them 2 weeks every 4. My ex and I had a dog before we split and eventually I became the full time owner of the dog. She is the most timid and good natured dog and has never bitten or attacked anyone and I don't believe she has it in her. When I visit my girlfriend or she visits me I take the dog. The little boy (now 4) loves the dog and follows it everywhere. Sometimes he gets a bit too boisterous and so we remind him to be gentle. I am forever trying to stop him from playing toys on her or pressing his hand into her head or back. However, he seems to think it's great fun to purposefully try and hurt her. I'm sure it is just him being inquisitive, but he also says things like "lets squish Holly (dog)". Today as I was leaving to come home (I live 200 miles away), he wanted to pass me a laptop charger and in doing so rather than give it to me, he dropped it on the dog's head (dog was sitting on my lap). I could see from his expression before and after that he meant to do it. The dog yelped and when we tried to say he shouldn't have done it he simply ran off. When he got baack he apologised, but laughing as he did so and then wanted to play. Which made me think his apology was simply to be able to play. The fact is I am fed up with him being reminded 20-30 times a day to stop dropping things and playing with his toys on the dog. He just does it anyway. I don't have children myself so this is my first experience of trying to help raise a child. My bond with the child is very good and we get on really well with him even wanting me to stay. The dad is still around, but he is a Narcassist and goes through life blaming everyone else for his actions/faults. I don't want him growing up to be like his dad. I keep falling out with his mum as she thinks I am too hard (which I possibly am) and I think she doesn't make him aware of his actions and the consequences firmly enough. For example when he came back to apologise she asked him if it was an accident, which he naturally said yes. To me this is not being responsible for your actions and justifying them!
It's pretty clear to me that the boy's behavior isn't about the dog. It's about YOU. He's testing boundaries and trying to see what he can get away with, and has discovered that hurting the dog pushes your buttons in a big way (understandable). It's an endless well of interaction with you!
You need to stop with the 20-30 no-real-consequence reminders a day. That's not teaching him anything more than that tormenting the dog is a good way to get your focus and undivided attention. Instead, talk with him about why his actions are not okay, and let him know in advance the consequence of continuing.
Since it's natural for kids around 3-4 to still be developing empathy, I would start by pointing out that Holly is a living creature with feelings, and she doesn't like when he does these things. With my 3.5 year old, I use the phrase, "It's only a game if everyone is having fun" (if someone is not enjoying the play, it's not a game, it's being mean/teasing). When he does hurt Holly, mainly ignore him and make much of her; ask her if she's okay and pet her gently. Then ask him to empathize with Holly. "Ouch, that hurt her! Do you like it when friends play too rough with you and hurt you?" or "Holly looks sad, I don't think she likes when you play that way" or "Holly isn't having fun with this game. What could we do together that she likes more? Should we pet her instead?" or "This isn't funny to Holly, she's sad! She doesn't like when friends hurt her." If he's interested/willing, encourage his efforts to try to make it up to Holly by petting her, throwing a ball, etc.
If he keeps going after this, you can give one warning, "If you don't play nice with Holly and stop [doing whatever is hurting her] then [consequence]". If he doesn't stop, follow through. No second, third, fourth, etc warnings. Once he understands the boundary and knows that hurting the dog results in time out (or whatever your consequence is), you can stop warning for intentionally breaking the boundary. Ideally the consequence should be somewhat logical- If he can't play nice he can't play with the dog at all right now, but it's largely a matter of how your girlfriend handles discipline/consequences.
It will probably take a bunch of repetition of consequences and lot of practice to stop constantly talking about it and move into decisively acting on it, but in the end if he gets more positive outcomes, like attention, feeling of getting away with something, etc, he will keep hurting the dog. If he's getting negative feedback, both internal from feeling empathy over hurting a nice dog he cares about, and external from adults, he is less likely to continue.