Edit: Apparently sandbox-exec is still usable, just not (publicly) well-documented. Would be nice of Apple to make sandboxing easier for regular users running untrusted apps that don't opt-in to the sandbox. I’m thinking of Firefox and Firefox extensions in particular.
https://7402.org/blog/2020/macos-sandboxing-of-folder.html
>The only non-folkloric documentation is found in the man page for sandbox-exec [...]
>Sandbox documentation has been a moving target over the years. Because it is a private interface, Apple is under no obligation to maintain forward or backward compatibility. Take note of the publication date of any information found online.
>Just to be clear, the sandbox profile format is not documented for third party use. Feel free to experiment with this stuff, but please don’t try to ship a product based on it.