Yes. But the reason they give for not allowing local programming environments is the risk of breaking OUT of the sandbox with an exploit.
But this is true for any app on the App Store.
But wouldn't it be easier to achieve with a shell ?
Any other app doesn't have builtin plausible deniability...
Also, that's just not true, a general programming language gives you a lot more attack surface, surfaces that are not testable with Apple's suite of verification tools.
Well, only for actual programming environments that run some direct form of a scripting language - the existence of iSH shows they're fine with sandboxed+emulated programming environments.
Maybe it's not Apple and Siri is calling the shots these days