You can also install a third party terminal in iOS, in fact the development options for coding on the go on iOS are much more mature than then hacky versions available on Android.
Also termux is going to be a thing of the past, because its developers refuse to use the newer Java based APIs in recent Android versions, as Google is closing down the API space available to the NDK, as means to close down on security exploits.
Android and iOS are really not equivalent here. Similarly you can install apps from outside the play store normally. No root, no unlocked bootloader, no funny business. Just a big difference in how each OS treats its users.