The way rng works in Sun and Moon, you can swap the parents of an egg and the eggs you receive will inherit the same corresponding stats and keep shininess. Magikarp has the shortest hatching time, so you can spam breed them until you get a shiny, reset without saving, and hatch the same egg with a different parent(s).
Comments on Profile Post by Triverr