Wells Fargo, until recently the biggest player in U.S. mortgages, has repeatedly felt regulators’ wrath over missteps involving home loans.