To protect the inheritance route, get the wills of whoever is leaving you the money changed to be left either in trust for the children, with you as trustee, or a brother/sister if you have them and if not, I’ll happily volunteer and then gift you it back minus the usual fee. After the divorce...