If you get an Android you can use termux and do literally anything. I like to write websites, write newsletters in vim and run a jekyll instance, transcode video with ffmpeg, etc.
I think the remaining friction is mostly ergonomics and integration
Termux for iOs might also be available, cursory searching suggests.
Termux and DOSBox are great for running or writing software on a phone. I almost never resort to installing or writing apps anymore as that is just more cumbersome and has APIs that keep breaking (not to mention the threats from Google about making non-Play app deployment more regulated).