You know, Firefox has that option right at the settings window. And if there's audio, it blocks by default.
I usually just blacklist these websites in my Pihole.
...such as one of those "totally-GDPR-compliant" accept-cookies-please modals maybe? :) I am 100% certain this is how a large number of sites bypass autoplay restrictions.
https://addons.mozilla.org/en-US/firefox/addon/disable-autop...