How to animate text over a twisted mesh (or text flowing along an infinity loop)
Just adding another approach...




Create a cube at the origin, scale in edit mode, subdivide. The orientation is as shown in the blue unmodified copy, aligned to world axes.
CtrlH Assign an Empty as a Hook to all its vertices
Assign two Simple Deform modifiers, a Twist and a Bend, settings as shown.
UV unwrap as you would any other cube, and control an emission shader with a UV Texture.


Now when you rotate the Hook-Empty in Z, (which you can key with a linear interpolation to loop) the squorus will twist as in the OP's animation



Along with this, you could animate the U-mapping location of the texture in a mapping node in the shader as well, to make the text animate along the faces..
see here.