This was much trickier than I had originally anticipated and have spent a few hours testing.
The config from samba wiki absolutely works, but it wasn't ranked higher in search engine and it's not general enough. https://github.com/zfsonlinux/zfs-auto-snapshot/wiki/Samba
Tested on ubuntu 22.04LTS, samba 4.15.9 and windows 11.