Samsung Galaxy S7 with Android 6.0.1 (Swisscom-branded) and software updates G930FXXU1BPH6/G930FXXU1BPH2/G930FXXU1BPH1 here.
I do not think it is not a good idea to switch off all battery-related notifications because then you will not be notified when your battery is low or fully loaded.
It has been mentioned several times here that an app called “Smart Manager” is probably doing these optimizations, and that helped me to find specific settings under
Settings → Applications → Application manager → “More” (on the top right) → “Show system apps” (because “Smart Manager” was not listed by default, but had to be there) → Smart Manager → Notifications.
After I had enabled the “Hide on lock screen” setting, the next time Smart Manager ran its optimizations the “Do not show again” (or similar; I had switched to French then) button below the notification was displayed again (it had been there the first time I had gotten this notification). I have tapped that button, and not gotten an “Optimization” notification since then.
However, as I am double-checking my settings for posting this, I find “Smart Manager” in the Settings right above “Applications” (I had previously used the quick settings on the top to get to “Applications”). There is a “More” menu on the top right as well, and a “Notification settings” item where now I find the “Power Saving” setting disabled. It is possible that this “Settings” item came with the last update. If you do not have that update yet and cannot or do not want it, you can try the approach I mentioned above instead.
HTH.