Client-side encryption will never be fully safe since people can spoof the device's unique ID. Do not rely on it to hide sensitive information from the client. Instead, store this information on a server with appropriate access control.
PS: As of writing,
OS.get_unique_id() is only implemented on Android and iOS. On desktop platforms and HTML5, it will always return the same value.