The downside of using the UID is that it can usually be changed by the user. For such purposes I’d go for an attribute of the page that can’t be changed, e.g. an ID that you add to a readonly field or something like that. I usually use a field called pid (for permanent ID).
Or make sure that the user can’t change the UID, or use the template (if the user is not allowed to change the template).
If the page uses a specific template the intendedTemplate() can be used maybe. But I agree with you, if there are other users involved it’s better to have something hardcoded somewhere.
The AutoID plugin is a good way to do it, and this is the way I do these things, but be aware that that css classes cannot start with a number, or just be a number but they can contain one…
class="21product" // this is bad
class="21" // this is bad
class="product21" // this is good
class="prod21uct" // this is legal css but not recommended, for readability sake.
So if you echo the AutoID number out, you need to put something before it, some kind of prefix.
Using the AutoID has add additional advantages, especially if you are planning to refer to pages of your site in other pages, saves the hassle of having to update those links if the UID is renamed.