Need to make bidirectional rotation counter

There is a very simple solution to this:

print 30 to 50 empty lines to the serial monitor to wipe away the previous text
and then print the actual text always at the bottom

void clearSerialMonitor() {
  for (int i = 0; i < 50; i++) { // print 50 empty lines to clear screen
    Serial.println();
  }
}

clearSerialMonitor() ;
Serial.println("This line appears always at the bottom");

In this tutorial in post #7

There is a demo-code that demonstrates this on an example how non-blocking timing can be coded