Question: are wifi passwords saved in keychain?
Answer: No, Keychain does not save WiFi passwords. Safari doesn't handle network connectivity. That is handled in the settings app (and is not synced across devices). iCloud Keychain will indeed restore wifi passwords from the previous phone.