“The stable option is that there is a built-in fact type in RM called the Reference Number. Indeed, this is not just a standard fact type in RM, it is a standard GEDCOM tag that should be supported by most if not all genealogy software. It will be completely stable. However, the management of the Reference Number is completely manual.”
GEDCOM has a tag called REFN (aka REFERENCE NUMBER) that is available on all primary records (individual, family, source) which has the purpose of entering a “A user-defined number or text that the submitter uses to identify this record. For instance, it may be a record number within the submitter's automated or manual system, or it may be a page and position number on a pedigree chart.”
It is the tag I use to store a unique identifier for all items/entities within my database. As a library professional I generate an accession numbering sequence. I may have discussed this in other entries.