Turns out to be fairly easy to disable autoplay for Safari on the Mac. First, enable the debug menu and restart Safari. I was able to skip this step since I’d already enabled debug ages ago - it’s generically useful to have around.
defaults write com.apple.Safari IncludeInternalDebugMenu 1
Then, Debug > Media Flags > Video Needs User Action.
For good measure I also did: Debug > Media Flags > Disallow Inline Audio.
Some HOW-TO documents suggest selecting Debug > Media Flags > Disallow Inline Video. I tried this but it didn’t seem to make a difference. I’m running Safari 10.1.2 on macOS Sierra 10.12.6.
That’s pretty much it. Hugely different browsing experience, overall snappier and less resource use, especially with a couple of windows open (something inevitably slips through).
If you really want to turn off the debug menu you can do:
defaults write com.apple.Safari IncludeInternalDebugMenu 0
and restart Safari again. But why would you do that?