The 1918 H1N1 pandemic just evolved into seasonal influenza (or co-evolved with the human immune system). In 1957 the H1N1 virus left the human race and was displaced by H2N2. It mutated in pigs for 50 years, then the H1 protein came back in the 2009 triple reassortment pandemic. That pandemic had minimal impact though because people who were exposed to H1N1 before 1957 still had partial immunity through cross reactive T-cells to the H1 envelope protein -- even after it had evolved in pigs for 50 years.
Immunity is very non-binary. There is "survivor island style immunity" which is sterilizing immunity that prevents an individual from being infected. But there's a lot of partial immunity that just takes the edge off the disease, even though the virus may still spread epidemically.