Played around with the sparks transition a bit more and found that scaling the keyframes of the mix node down to within one frame in the middle of the animation and then setting the interpolation mode to constant makes it virtually impossible to notice during the loop. Only when manually scrolling through the frames ... at least in my case.