Ocean modifier WITH foam loop

so the answer for just the loop part is kinda given in https://blender.stackexchange.com/questions/2858/how-to-create-a-seamlessly-looping-ocean

however that does not seem to work if you intend to have the foam work with it.
combing 2 foam maps don’t really give any good results except for the start and end frames if you animate them to fade over each other.
anyone got any ideas how to have foam that looks alright in a loop.

IDK guys, have I just overlooked a simple answer, or is there some math that can solve it?