It probably can be packaged in a flatpak but it would be more of a challenge than using the docker package. You could implement your use case today with the default docker compose setup. You could be up and running in minutes. Start it with -d and it would even start automatically on reboot. It won't consume any more resources than a flatpak version.
Just try this in a directory somewhere: https://immich.app/docs/install/docker-compose/
As for docker itself, if you're on Ubuntu or Debian, you can use the docker version from the stock repos. The package is docker.io and for compose you want docker-compose-v2