This particular situation I don't have ArcFM. This is a new custom class extension that populates an attribute with some custom code depending on various things, similar to an ArcFM autoupdater.
I found a good ArcGIS sample based on your option two which worked perfectly. It now gets guid and name from the TYPE object of the objectCategory and populates them into the domain used by the tool's input parameter. Now if new classes are added in the future they won't be hardcoded in the tool.
IGPCodedValueDomain pGUIDDomain = new GPCodedValueDomainClass();
//pGUIDDomain.AddStringCode("{hardcoded GUID}", "Extension 1");
//pGUIDDomain.AddStringCode("{hardcoded GUID}", "Extension 2");
// Set up GUID object for the desired component category
ESRI.ArcGIS.esriSystem.IUID uid = new ESRI.ArcGIS.esriSystem.UIDClass();
uid.Value = "{D4E2A322-5D59-11D2-89FD-006097AFF44E}"; //GUID of the Class Extension Category
ESRI.ArcGIS.esriSystem.ICategoryFactory categoryFactory = new ESRI.ArcGIS.esriSystem.CategoryFactoryClass();
categoryFactory.CategoryID = (ESRI.ArcGIS.esriSystem.UID)uid;
object object_Category = categoryFactory.CreateNext();
while (object_Category != null)
{
Type theType = object_Category.GetType();
pGUIDDomain.AddStringCode("{"+theType.GUID.ToString()+"}", theType.Name.ToString());
object_Category = categoryFactory.CreateNext();
}