VK100 ESCape sequences start on Page 59 https://vt100.net/dec/vk100in2.pdf
GIGI BASIC at http://bitsavers.org/pdf/dec/terminal/gigi/AA-K335A-TK_GIGI_... (read bottom of page 1-1 carefully --think of the possibilities...you may want to add a security feature to limit that here in the post-dystopian wasteland)
VT102/400 ESCape sequences at https://manx-docs.org/collections/mds-199909/cd3/term/vt420r...
The state of the art in this area is a commercial product by a small team in Arizona at https://vandyke.com/products/securecrt/index.html
Applause for not being afraid to take on a concept that's been done (wrong) many times.