Freeze child page URLs so parent permalink changes don’t give 404s?

If your concern is about internal links, You should be using the get_permalink() function, and using proper nav menu objects in your menus, never custom URLs.

If you would like to do this in the content, refrain from using the hyperlinking feature in TinyMCE, and make a shortcode similar to:

https://readforlearn.com/freeze-child-page-urls-so-parent-permalink-changes-dont-give-404s/. Registering shortcodes is extremely straight forward.

Bottom line, always get permalinks from IDs.

If your concern is about external links, redirects are all that will help. If you have an extremely high performing page or post, this is worth it. if not, it’s more headache than helpful.

301 Redirects / template_redirect hook

You can use 301 Redirects when you are changing a page’s permalinks to ensure old URLs redirect. You can also add actions to the template_redirect hook, but good luck debugging when you happen to add a new page that has the same URL as an old redirected page 😉

If you really want to ensure the parent does not affect the child, consider removing the parent slug from nested URLs and forcing children to live at the same level (URL wise), parent or not. 2 pages cannot have the same slug regardless of ancestors, so this is perfectly safe to do. This can be done by filtering the WP rewrite rules.