Ok, I have for some time been taking a very deep dive into PDF - summary : it is hard to believe such a fckd up format got so big, Adobe really have a lit to answer for.
However, there is a way to do what is asked, that is use of named destinations. These are what you use to open a PDF at a specific section (as opposed to page #).
You add #nameddest= to your file/url when you open it. A named destinations will change as the PDF changed as it has an extra level of indirection allowing it to associate with a “section” instead of a page.
You can make a named destinations in some PDF editors, or convert a bookmark or link destination etc.
into a named destination. (eg using autobookmark or debeneu).
But, the hidden secret that is out in view, if you know to look, is the use of pdfmarks - this is the key and would easily allow this feature to be implemented and they are a “layer” that goes in at the distilling (ghostwriting) phase of pdf generation, turning PostScript into PDF.
Search and you will find.