Text this: Modelling and investigating memory immune responses in infectious disease. Application to influenza a virus and sars-cov-2 reinfections