It looks like we may be greatly over-complicating the process for reusing modules within an assembly.
Consider that Asciidoctor automatically generates a unique ID for every section in a document. It ensures that each ID is unique even for included .adoc files. In other words, if you include the same module twice in an assembly, Asciidoctor will generate two separate, unique IDs for those modules.
I verified this by creating a test assembly and then including the same module three times:
= Test Assembly
This assembly is a test. This is only a test.
include::module1.adoc[leveloffset=+1]
include::module1.adoc[leveloffset=+1]
include::module1.adoc[leveloffset=+1]
The output was built without error, and Asciidoctor generated a unique ID for each module1.adoc inclusion (module, module-2, and module-3).
Therefore, is there a reason why we have defined the mod docs standards to require, 1.) manually overriding the auto-generated ID for every module title, and 2.) using attributes to guarantee uniqueness in each ID? If not, it would be much simpler and quicker to just let Asciidoctor generate unique anchor IDs for modules.
Even if this won't work for some reason, we could still use the built-in :idprefix: attribute to manually override an automatically-generated ID. For example, if you defined this (probably just once in the main attributes.adoc file):
:idprefix: {context}
Then in an assembly, you could apply the unique context to an included module:
:context: assembly-1-name
include::con_module-A-being-reused.adoc
In this case, if the title of con_module-A-being-reused.adoc
is "Module A", then the automatically-generated anchor ID for the module would resolve to assembly-1-name-module-a
.