It's totally okay to manually set the YouTube player to 4K for this use case.
For low-motion static content like a slideshow or console window, a ultra-low frame rate usually results in acceptable fidelity while minimizing bandwidth, but not all hardware decoders (think Chromecasts, TVs) play well with them, so it wasn't possible to go down this road in general.
(Disclaimer: This is my personal opinion and not that of my employer.)
I wish they would use special compression for text that's not moving.
Do you have a better suggestion?