1. Question: Why can one even hire a carpenter i.e. a professional, to build a Sukkah on chol hamoed sukkos but cannot build a fence, even by yourself, on chol hamoed according to the Be’ur Halacha?
1. The first Be’ur Halacha in siman 540 begins by quoting a Ritva that only by rooftops that are usually not used but the person wants to be extra careful is one forbidden to build a fence around it on chol hamoed but he concludes that other poskim hold that even if the roof top is normally used and there is a definite mitzvah to build the fence still it should not be done on chol hamoed.
2. The first Be’ur Halacha clearly and unequivocally concludes that no matter if the prohibition of doing expert and craftsman work on chol hamoed is rabbinic or on a Torah level it is permissible to have the sukkah built or fixed because it is for a mitzvah. It can even be fixed at the very end of chol hamoed when you don’t have to potentially use it because the Torah says “The holiday of sukkos you shall make for yourself seven days.” This implies for the entire seven days there is a mitzvah to have the sukkah so you can fix it and build it by anyone at any time of chol hamoed. He also compares building a sukkah to writing a mezuzah or tefillin to be used on chol hamoed which is needed for the need of the mitzvah at that time.
Answer: A fence does not have to be needed on Chol hamoed even if it is a mitzvah to make because you can just close off the roof for the holiday whereas you need the Sukkah on throughout the holiday and the scenario of the refilling and mezuzah is also where you need them right now during chol hamoed. (Look in footnote 6 of be’ur halacha 540 in Dirshu Mishna Berura and Page 68 footnote 4 on the first Be’ur Halacha of siman 637.)