Günter Milde - 2 days ago

Thank you for the report.
I'd classify the problem as a documentation issue rather than a bug.

The problem is the difference between an reference name and an identifier .
Identifiers are derived from reference names via the identifier normalization. Due to identifier restriction in HTML4, a reference name consisting of only digits "vanishes completely" unless prefixed. (cf. https://sourceforge.net/p/docutils/feature-requests/66/).

This is why the reference-name "5" is replaced by the auto-generated ID "footnote-1" (with 1 just be a running number to disambiguate all "footnote" IDs). A similar problem happens to, e.g. section headings consiting of just a date.
However, prefixing the ID with "user-content" allows the "1" to be appended.

You may play with the attached test script.