I backed up my phone to both hard disk and iCloud, went to the Apple Store for a new iPhone and started the restore from backup in the store. Of my 4 email accounts, the two non-gmail ones got set up properly and the two gmail ones did not. I got a notification to complete setup of one of the accounts, which I canceled, then the same for the other one, then the same for the first one. I canceled all three notifications because I was trying to do something else that didn’t need the email accounts, but they came back again whenever I tried to do anything with the phone. Eventually I broke down and tried to sort the issue. The three popups appeared multiple times, even while I was trying to enter the password in the settings app, so that I had to break off from entering the password to dismiss 3 popups that were demanding that I do what I was already trying to do.
Don’t know if it’s Apple’s fault or Google’s, but it’s a UX fail.