Wells Fargo agreed to pay $145 million to end a Department of Labor investigation into alleged malpractice with employees’ 401(k) retirement accounts Monday, in the latest major penalty for Wells Fargo, though the bank denies wrongdoing.