I would guess that you would see more degradation after a given number of saving iterations if you alternated back and forth between medium and maximum than if you used medium every time, because the algorithm would be swapping back and forth, preventing the preservation of the existing compression. I think JPEG compression finds the function that best describes each block of pixels, so if you open and save without editing a particular block, I imagine that it would be preserved. If you alternate between compression levels that use a different block size, then you would probably be worse off than if you had consistently the lowest quality setting every time.