Bake animation with modifiers, including "real" location of vertices
Create a duplicate of the object for every unique frame of the animation.

Apply the modifier separately on every object, with each object on a different frame.

Use &quot;Join as Shapes&quot; to combine all the objects into one. (Menu next to the Shape Keys panel, or ops.object.join_shapes().)


This will produce a single object with a shape key for every frame of the animation. You can then keyframe these shape keys to show on the correct frames.