I do feel bad for medical mice, especially things like SCID Mice https://en.wikipedia.org/wiki/Severe_combined_immunodeficien..., which are basically only born to be infected with something, and then die. Even more so in a recent case of academic fraud I've seen involving cancer testing, where the data was obviously faked, but mice still died for the data.
But yes, it's hard to test immune responses without hurting a living animal, since you'd have to somehow have a non-alive immune system to test on otherwise
How do you feel for wild mice, who typically have short lives of borderline starvation before they are eaten by a snake, bird, or other predator?
Should hunter gatherers be thankful if we kidnapped them and tortured them to death in our labs?
What about people from Gaza?
Is it acceptable to do human testing as long as you pull the humans out of say east Africa during a famine?
These examples don't work. Hunter gatherers didn't suffer, and the other two are in outlier bad situations. Set them free in a stable situation and they'll live happy lives.
If that description of wild mice is accurate, there is no happy free life. The baseline is very different. I'm not going to try to say how that should affect the rest of the ethics, but it's an important point to consider, and not as easily dismissed as your examples would imply.