You should probably just use a guuid. Squidex unique validations are not always unique. If you make two documents very quickly we have had duplicate “unique” ids before. If this is not possible you can consider using a custom validation which can check if the value has been used in any of the relevent schemas.
Regarding the GUID approach, is it possible to have a “hidden” field in a schema, such that I can generate a GUID when new content is added, but the user will never see it? Or to have a field that users cannot edit?
You can mark a field as disabled and create the ID with scripting. But I have to make an extension to the scripting extension for that. Feel free to create a feature request.