If you are looking to self-host a scalable backend that runs arbitrary code in python/typescript/bash/go with optional sandboxing using nsjail like figma, nsjail is what we use as isolation layer at https://windmill.dev (Open-source alternative to Retool/Airplane)
(Our python nsjail config for instance: https://github.com/windmill-labs/windmill/blob/main/backend/...)