It's very possible for Linux phone homescreens to be sandboxed (like on Android) in a Flatpak with the appropriate permissions and D-Bus protocols. Might be a little more complicated but you could do it I'm sure.
@DrewNaylor you don't want to use flatpak, you want to use systemd to start the homescreen as a sandboxed service. e.g. gnome just switches between systemd targets in the user to eventually start:
https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/main/data/org.gnome.Shell@.service.in
@jane Didn't know that. There's some interesting stuff in that service.
@fun Looked into it but it seemed pretty complicated to use on its own.