PDF annotations already have a ID field. Though sadly in the PDF specification they are both optional, and only need to be unique to the Page itself.
However, generally annotations created using our SDK will have a globally unique ID. See the “name” key in your XFDF stamp data you provided. That is a GUID.
See here for code examples.