Using Wasm for this animation really is an overkill IMHO.
*) https://learn.microsoft.com/en-us/typography/opentype/spec/g...
Edit: IIRC Ligatures are applied recursively, so you can have a ligature based on other ligatures. If I am right here, each ligature can consist only of two glyphs (the glyph of the previous animation frame followed by a dot). This would keep the GSUB table small.