If using a shader..
If your animation can stand being mixed over itself without losing realism, you can split it into identical A and B rolls, of loop length.
'B's jump is over the beginning and end of the loop. 'A' is time-shifted by half the loop length, so its jump is in the middle of the loop, and it's continuous over the beginning and end.
Then you cross-fade the rolls in such a way that 100% A covers the jump in B, and vice versa.
This can be done with a node group:

The yellowish nodes are the A roll, the Modulo means every time it reaches 'Period', it starts again from 0. The addition of 'Period/2' means it starts from halfway along.
The Ping-Pong does the cross-fade. It's arranged so the outputs can be connected to a mix, of some kind, between colors, or parameters. or shaders. and the cuts will be covered.
To use this with Amin Missaoui's lovely node-group, you have to tweak his group slightly, and bring the internal #frame
driver out to the interface, so you can use the group twice, offset, for A and B:

It doesn't work too badly. But of course, you could use the same principle in any animated procedural shader of your own. You may not be mixing duplicate shaders.. it could just be colors, or UV's, normals, or whatever works.
A 50-frame loop:

