Crawford deemed it to not work
So, a few minutes after I posted this question, I found some information from Jeremy Crawford which explained how it didn't work. One of his answers here says that it says "a Medium creature", which does not include creatures on top of other creatures:
Twitter user: Just so you know, the #DND hive mind has already decided that a medium centaur can ride a centaur riding a centaur ... (repeat) ... riding a centaur. The puzzle is solved. It's centaurs all the way down.
Crawford: If your DM decides that "a Medium creature" actually means "a tower of Medium creatures," that's an amazingly trippy, English-defying campaign you're playing. Live the dream!"
In response, someone else asked him to clarify whether centaurs could ride other centaurs; another tweet by Crawford explained that mounts must have suitable size and anatomy to ride it:
Twitter user: Doesn't that still mean that a centaur can ride another centaur?
Crawford: The rules on riding a mount specify that a mount must have a suitable size and anatomy for you to ride it (PH, 198). If the game makes an exception to part of that rule—about the creature's size, for instance—the other part of the rule still stands.
While I could personally see the argument that only one Medium creature would be "riding" the centaur, the second makes the centaur deathstack invalid.