Create an animation and use it as text mask?

is it possible to make an animation of a surface in AE that then works as a mask on which to run text?

Imagine folding a piece of paper (like origami), only there is text on that paper.
I want to make a folding motion like that, but where the "paper" is transparent, so that the text becomes free floating and layering etc. according to the folding of the "paper". Now, i also want to animate the text on the paper, so that it is written in time (from a blank paper to a paper full of text), simultaneously with the folding motion.
I could of course place the words so that they stay within the fields made up by the eventual "creases" on the "paper", and then animate every single "state"/placement of every single word, according to help-keyframes/template images made in e.g. photoshop or illustrator, but this easily gets complicated and time-consuming with a lot of text.

i thought an idea might be to make a model animation, which is a surface being folded, like a paper, then transform it to a mask or something, and then animate the text according to that mask-animation, but i am not sure if it is possible and how exactly to do it.

I don't necessarily want to use 3d for this, as the "simulation" of spatiality available via 2d is enough for me to illustrate the folding movement of the diff parts of the surface. But any suggestions are welcome!

I really appreciate any help with this!
I have some experience in AE, but as it is self-taught, it is a bit sporadic, and I don't know all the right terms. I apologize in advance for any stupid or self-evident questions!