In instances where you're using a View in an embedded manner, and you have components which will need to build their ID based off of some unknown unique value, you'll want to supply a unique value to the Embedded View (or instanced View) as a param, and then bind the domId value against that supplied param.
For Flex Repeaters, I usually just rely on the automatic index param passed in by the Flex Repeater, and bind against {view.params.index} + "_my_component". This will result in each instance within the Flex Repeater as having id attributes in the DOM of 0_my_component, 1_my_component, 2_my_component, etc.
You should use the same approach outside of a Flex Repeater, though you should target whichever named param you are passing in. Make sure to provide this param at the View level and provide a default value which does not make sense so that you know when it's being used appropriately.
For example:
I place a new param at the View level named my_param. I set the value of this param to "XXXX". Thus, when used by my component as part of the domId binding, I'll see a value of XXXX_my_component. This is obviously not a value I would expect and if I see this in use I've done something wrong. Now, when I use this same View in an embedded capacity I should make sure the embedded usage receives a param of my_param. If I supply the param value as "YES", I should expect the domId to resolve as "YES_my_component", and therefore I should expect an HTML id attribute of the same.