There is every reason to expect that natural immunity (derived from a previous infection) is better (than that conferred by a vaccine), simply because the immune system will recognize the entire virus and not just the spike cell.
This pre-print paper (https://www.medrxiv.org/content/10.1101/2021.08.24.21262415v...) concludes:
"This study demonstrated that natural immunity confers longer lasting and stronger protection against infection, symptomatic disease and hospitalization caused by the Delta variant of SARS-CoV-2, compared to the BNT162b2 two-dose vaccine-induced immunity. Individuals who were both previously infected with SARS-CoV-2 and given a single dose of the vaccine gained additional protection against the Delta variant."
If having pre-delta covid made it more likely that your immune system could face delta, then I think it would stand true for other variants, too.