HBO's "Rome" features in it's very first battle scene (and later also in S2E06) a pretty smart looking changing mechanism to replace all the exaustet front line soliders. Neither the Wikipedia nor Caesar's books state anything this explicit to this topic. Could this collective drawback into one's own corps have been a real tactic? If yes, where was the centurio all the time? In the series they always stand with the very first line in mid of combat but this rather seems to be a simplification for the TV audience. Or was the entire thing more like an individual change of positions with the guy behind you and the centurio had nothing to do with it?
If we only look at texts, I do not know of any sources that note this exact mechanic that was portrayed in the show. If anyone has such sources, then forget I said anything. But until then, I'm going to build my argument based on the lack of documentation for the existence of this mechanic.
Lack of Documentation
All that said, the lack of documentation in itself doesn't mean anything, especially when we're talking about an individual soldier's fighting techniques. Unfortunately, up until at least the pike and shot era, we know frustratingly little of how soldiers fought. Scholars disagree on many little things, e.g. "Do Greek Hoplites hold their spears overhand or underhand?" "Do soldiers literally charge into each other, or stop just short of weapon range and poke around first?" These small things could make a big difference in how battles were actually fought, and we just don't have the documentation to back up these hypotheses, probably because writers back then expected this to be common knowledge, kind of like, in modern times, how we know that if we're in a gunfight, our instinct is to take cover instead of charge at each other.
Thus, it seems that the best way for us to know how soldiers fight in history is to reenact it. This is not perfect, by far, as reenactments lack the general sense of fear, exhaustion, and chaos that would be so prominent in real battles consisting of thousands of people. However, good reenactments could at least give us a clue as to how soldiers fought, and what commands and mechanics could be followed, and which could not. For we know that pike phalanxes worked very well on paper, but not always well in real life due to the unforeseen variables. We need to be aware of the Armchair General Syndrome and be cautious when treading these waters.
Therefore, I would say that it is insufficient for us to make a logical conclusion based just on texts, albeit this may or may not be satisfactory with the subreddit's standards of quality. Nevertheless, I will continue with my conjecture.
Conjecture
I propose that the mechanics portrayed in the show could not be dependably performed in heated battles. The armaments of the legionary also do not support the doctrine of rigidly staying in position and not advancing, as their gladii require the wielder to advance through the range of a spear to cut the enemy. Thus, the line would not be as rigid as portrayed in Rome, and would not be capable of such drilled front-line rotations. Not to mention that combat is extremely stressful; commands are hard to hear, and men don't want to turn their exposed backs to an enemy so close. Not everyone would be able to hear the command, and the organized line switching would fall apart within the first rotation.
Thus, I do not believe that soldiers could adequately perform this maneuver.
I actually wanted to talk a lot more into how I came up with this conclusion, but I have to get off work. If people are interested, I can keep writing.
It's referred to in many places (Caesar, Livy) but neither go into the logistics of how such a thing would work. So it's the great unknown. Now if you subscribe to the 'pause' model of combat (as expounded by scholars like Goldsworthy) then there would be periods of non-combat when the lines could be exchanged.
As for how it's depicted in HBO's Rome (I've just seen the opening battle you refer to), my semi-educated opinion is no, their version is too fiddly. Moving tens of thousands of men in such a cramped space quickly is (for me) hard to believe. But it's the only way to depict line relief for dramatic purposes, the 'reality' (our at least my preferred model of ancient warfare) would be unbelievable to modern audiences.