In the 80s in order to prove that ulcers were caused by bacteria, a doctor infected himself with said ulcer-causing bacteria and treated himself with antibiotics.
https://www.discovermagazine.com/health/the-doctor-who-drank...
https://www.discovermagazine.com/health/the-doctor-who-drank...
They didn't pass through him without incident, every account of this story I can find notes that he did get sick. The modern perspective of the story seems to be that he had an immunity from previously having dealt with cholera.