In theory Flatpak allows for sharing of dependencies and has sandboxing built in. This comes at the cost of needing special tooling, a repo, and non-portable (portable here meaning you can put the files wherever you want) applications. In practice you're probably better off using Firejail or the like on AppImage if you want the sandboxing anyway, because of things like the issues noted in the article. Snap is like Flatpak but even worse because it is entirely controlled by canonical.