iOS is the second version. Linux with flatpak and SELinux is the first one. It is certainly possible to secure Linux a lot while still allowing the user to tweak whatever they want. There is a tool called flatseal which lets you adjust the sandbox settings for any Flatpak.