As a primary cause, not directly, but it does mention it as a top cause of tubal issues, which is related to infertility, and as some increase factors for infertility /end of page).
I do believe that, because the presence of STD overall as a proportion of sexually active people has diminished/has treatment, the effect they may have in fertility has decreased.
Infertility is MOST commonly caused by age. That should go without saying. many other things can contribute (including smoking), but nothing reduces fertility like the passage of time.
There’s a lot of beating on this old doctor mentioned by the OP as if he’s some demented old man, but he’s generally correct if you take PCOS off the table which is an inherent physiological/genetic issue. For things you can do something about re behavior having lots of sex partners and the higher risk of STDs associated with that behavior is the # 1 risk for infertility.