There is no readon to add any animmation to a 404 page. People aren't going to stick around long enough to be impressed with your coding prowess. If they hit a broken link, they're more likely to just leave your site.
However, it is a lot of fun to spend some time working on a page you hope no one ever sees.
And if you are intetrested in displaying a timed series of images using a flexbox with just a smidgen of javascript, this may be the helpful code you need.