One of the main components of an immune system are antibodies, which are protein molecules that bind to and mark foreign pathogens so they can be attacked by other components of an immune system.
Researchers at the Darwin Genetic Research Station used genetic engineering to create children who had extremely advanced immune systems, which Doctor Sarah Kingsley and her team considered their greatest achievement. The system was designed so that the children would release airborne antibodies when a pathogen was encountered. This turned out to be lethal to normal humans as the airborne antibodies would attack an individual's DNA and cause them to age rapidly. (TNG episode: "Unnatural Selection"). Captain Jean-Luc Picard would call the station the one exception to the ban on genetic engineering that should not have been allowed. (TLE novel: The Buried Age)
In 2369 a type of artificial grain was discovered on Velex that had healing properties. While it could be harmful or even fatal to beings with artificial implants, it was perfectly safe for individuals without implants. Further analysis was performed on the grain which found the grain could not be consumed for extended periods without compromising a person's immune system. The grain was marketed as an occasional supplement for individuals to consume. (TNG novel: Foreign Foes)