I have a hard time understanding how local and remote permissions interact.
They don't.
When you mounted the NAS you passed the user name peter with a password for peter set on the NAS. From that moment on everything you do will be as peter - on the NAS and not peter - on the client.
If you did not specify the uid / gid of peter in the mount the share would have mounted with root as owner / group and permissions of 755 - on the client. Root can read and write but everyone else can only read. When you added the uid / gid of peter in the mount you replaced root with you.
When I first read your post I thought the issue was that you needed others besides peter - on the client - to have write access which is why I added the 777 dir and file modes. But to the NAS even with the 777 modes on the client the only person accessing the share is peter - on the NAS.
The second issue is the Linux ( and I'm assuming the NAS is running Linux or something Linux-ish) permissions of the shared folder on the NAS. It's permissions have to match or be greater than the authority granted in the samba share.
So if I set permissions on my Public folder to 777 but create a samba share that stipulates read only access the client will only get read access since samba is the gatekeeper as it's permissions are less the than the Linux permissions.
Conversely if I set my Public folder to 755 but create a samba share that allows guest write access no one will get write access because Linux itself becomes the gatekeeper since it's permissions are less than the samba permissions. Samba never overrules Linux.