Instead of using an intermediary entity (CategoriesSet), you could just create 4 associations between Product and Category, e. g. Product_CategoryMain, Product_CategoryOptionalOne, ...Two, and …Three.
You can add a delete constraint to the domainmodel so that a Category can only be deleted if it is not associated to a Product via one of these 4 associations.
Using the associations allows to use the the standard reference selector widget.