Its even worse when you force Firefox to use wayland its icon doesn’t even show.
Edit: Oh since everyone now is confused; I only have the flatpak version of Firefox installed yet it doesn’t use the pinned icon and doesn’t even use the firefox icon under wayland at all.
Sandboxing is not the main feature of Flatpak/Snap, being able to ship an app for various distributions without having to configure them separately is. Docker/Podman can do that, but then you would actually be shipping an entire distro.
Regarding docker/podman that’s why I wrote depending on usecase, for servers it makes sense to distribute because of scalability, on a single user OS it does not.
From what you write I guess that nix does the distribution part of flatpak, so that seems fine, there’s probably a catch/limitation somewhere, there usually is, but it could be an acceptable one.