You don’t say what type of programming you do, or if you’re just learning or developing professionally, but maybe something fully online would work? For example repl.it, stackblitz, or Visual Studio Code for the Web.
I second the suggestion for getting a Bluetooth keyboard for the iPad.
Yes this is a thing and it’s been around for quite some time. If you’re trying to approximate TeX, you may also be interested in MathML.
I need to go lay down; I’m having flashbacks to the good old days of “XML everywhere for everything all the time”.