My Galaxy S7 is not saving wifi passwords. I think the reason behind this is that I refused google to sync wifi passwords with my account. I searched for a way to enable that feature. I'm supposed to open the Settings app, click on "Google" and change the Networking settings. The problem is that there's no "Networking" option in the "Google" section. I can't root my phone because it's still on a warranty period so most solutions suggested on this question-board don't apply to my case. I tried to clear the cache of the Google Backup Transport, but it doesn't have any data to clear (0.00B of internal storage used). Passwords are lost only after disabling and enabling wifi. If the wifi is turned on all the time, I can reconnect to my wireless network without the need to enter a password.
I think the option you are looking for is now in Backup menu in Settings. Try searching for "backup" and "back up". Screenshot:
After enabling it you also need to select your primary backup account (search for "Backup" this time if you don't see it).