You are correct. It was noticed that Milk Maidens did not contract smallpox and that started the investigation. They discovered almost all had cowpox at one time and thus came the smallpox vaccine.
I didn't know that about the Milk Maidens. That is amazing.
That is like John Snow observing that cholera was occurring near a specific water pump at Broad Street in the Soho district of the City of Westminster, London, England.