I can not really find a satisfying answer to the following question:
What would be the best practice for a module to add a new product attribute to all attribute_sets (and possibly at a certain location).
All approaches I can find seem to refer to adding a new attribute to just one attribute set.
There is a magento way for it
Example:
));
To add attribute to every attribute_set you need to set
'user_defined' = trueand set'group' = 'your_group_name'. If needed magento will add your group to every attribute set, and attach attribute to it.