https://family-law.freeadvice.com/family-law/child_custody/enforceability-of-non-compete-work-agreements.htm

Even if a stepparent has not legally adopted a child or married the child's biological parent, a judge may award a visitation rights or primary physical custody to the stepparent. The stepparent must make a request and have acted as a parent to the stepchild for a significant period of time.

translation: if you remarry, your second wife will get to keep your own biological children after divorce.