On Android, I've used Hacker's Keyboard since my earliest days on the platform and still use it to this day. It provides a full 5-row layout including modifiers, control keys, and arrows. It works exactly like you'd expect it to work. I can't stand the default keyboards.
On mobile Linux, there is a keyboard called squeekboard that lets you define the key layout using .yaml files. The default layout is pretty limited, but I created my own portrait and landscape 5-row layouts also with modifiers, control keys, and arrows that makes the experience so much better. I'm typing this on my custom portrait layout. I often edit code and use the terminal with this layout too. phone keyboards are bad because of bad design choices, not because touch keyboards are inherently bad.
I know for sure it's on F-Droid. I installed it fairly recently (like a month ago). Pretty sure the name is "Hacker's Keyboard" and you need the apostrophe in the search or F-Droid won't find it.