Just buy a tablet at that point.
With a terminal being a core use for the machine?
‎Termius: Terminal & SSH client

‎Termius is an SSH client and terminal how it should be. Connect with one tap from any mobile and desktop device—no re-entering IP addresses, ports, and passwords. With a free Termius Starter plan, you can: · Connect from your mobile and desktop device with SSH, Mosh, Telnet, Port Forwarding, and S…

App Store
Yeah, trying to use either a soft keyboard for that, or a tablet keyboard while lounging on the couch.
I bet you money that you statistically use the touch screen keyboard on your phone significantly more than you ever are to your hardware keyboard for your PC.

You would be very very wrong, since I hardly use my phone.

But to your point, a soft keyboard is very different for conversational input that autocorrect and predictive typing excels at, and command entry and scripting where syntax is critical and you aren’t really typing in English or some other language.

I write and run plenty of small to medium Python scripts on my iPhone. It's an adjustment, but it's absolutely manageable.
Is that your preference?

Not particularly. I use it because it's always available.

But the limiting factor is way more the lack of real estate than it is typing.

I’d much rather have something with a dedicated keyboard and sturdy hinge.