Something similar can be made utilizing Lottie Animations within on while on scroll interaction for an element that is set to a display of sticky. The tricky part will be positioning the timing correctly of how many frames are going to be animated in between sections.
I made a cloneable example as a rough idea of how something like this could be achieved. Feel free to take it and copy the similar interactions.
We also have an awesome video on utilizing Lottie Animations while scrolling within our University if you haven’t checked it out yet. It will bring some insight on the basics of how something like this can be achieved.
Hopefully this helps a bit and please let me know if you have any further questions.