You're telling those namespace / cgroup features have nothing to do with security? Not in any way, shape, or form? I'm a little skeptical.
To provide a security boundary between Linux processes, it's currently considered best practice to use something like Firecracker or gVisor.