The Termux Linux terminal and environment (https://termux.com/) is installable via F-Droid. Among the terminal schemes is an e-ink mode of dark-on-light. Font size is scalable.
Through Termux you have your choice of terminal-mode editors, including vim, emacs, nano, pico, and numerous others.
The handwriten notes feature is also quite good. Text-recognition is a bit iffy but does work.
My main reservation with this setup is that Android's memory management is fatally flawed and processes can be terminated at any time without warning. Terminal sessions really ought to be exemptable from that, but AFAIK they are not. (Please correct me if I'm wrong on this.)
Still, it's a quite good environment with nearly 1,500 packages available using the APT package tool.
Smaller current BOOX devices start at about US$250, used could likely be less than this.
Any Android or LineageOS -capable device should be able to function likewise. There are a few Linux-based devices also on the market (and yes, Kobo is one), including the reMarkable tablet (my major gripe: 16 GB storage is simply stupidly small, this supports a cabled keyboard but not AFAIU Bluetooth), and devices from Pine (in process) and possibly Purism.
A longer review of the Onyx BOOX here: https://news.ycombinator.com/item?id=27521248