Depends on what kind of 5 star hotel. A JW Marriiot, Intercontinental or Hilton won't care ( well depends where )
However, places such as Aman, Peninsula, or similarly rarified properties tend to take a more measured approach, primarily out of consideration for the comfort and discretion of other guests, and to uphold a certain standard of decorum and security.
One of my preferred hotels in Rio, for instance, requires identification for any guest one wishes to bring upstairs. I typically raise the matter with the front desk or concierge beforehand, saying something to the effect of, “A gentleman friend will be joining me in my suite for a few hours, may I enquire as to the appropriate protocol?”
It’s all handled in the most civilised fashion, with the utmost discretion and courtesy throughout. No one judges.
If anonymity is what one seeks - I suggest an Air BnB rental, and perhaps, hire two men for the evening. Or more.