Hmmmm, now we are starting to fight all the recent Android security features... I think you could use this trick to do what you want.
glob.overlay = app.CreateOverlay();
layHead = app.CreateLayout("Linear");
glob.overlay.AddLayout( layHead, 0.5, 0 );
This is similar to the "Chat Head" sample, it will create an overlay above all apps that is basically invisible because it's less that one pixel in size. Your app will automatically request the users's permission to allow overlays. The beneficial side effect of this tiny overlay is that your app will be allowed to launch itself from the background on Android 10+. So you can set a short timer to bring your app back to the front after starting Termux (in theory), using the app.ToFront() or app.LaunchApp( "com.smartphoneremote.androidscriptfree" ) method.
However I can't guarantee that Termux will keep running in the background as Android is much more aggressive these days about shutting down background processes.
Maybe you don't need Termux and you can achieve what you want using NodeJS inside DS?
Of course if you take the plunge and go with full Kiosk mode, these problems will probably go away and you could add Termux as an 'allowed' kiosk app. Likewise if you root your device.
Regards
David