In theory all you need is a keyboard and a screen, the other hardware is whatever shape works, right? Coding "on the phone" sounds like a "veritable nightmare" if I'm using the stock screen and "keyboard" solution that is half the visible field. VSCode + SSH lets me code on the cloud box, whatever combination of unlocking/jailbreaking/hardware purchasing gets you that, is a solid way to go.