I think it is possible to avoid the flickering via double-buffering, right?
I don't exactly remember how that works. There is the alternate screen buffer:
https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-T...
Maybe there was also a special sync terminal escape code or so.