If anybody is looking for a clean isolated workspace for building software:
- For testing distro #packages
- For isolating potentially malicious #buildscripts
Have a look at bubblewrap in combination with btrfs or overlayfs. #Bubblewrap is an excellent low-level sandboxing container runtime.
https://wiki.gentoo.org/wiki/Chroot_for_package_testing
https://wiki.archlinux.org/title/Bubblewrap/Examples