The best thing to do to prevent gum disease is to visit your dentist
regularly. It is true that people with problems of the immune system can have a wide range of symptoms and chronic infections, including problems with the gums. The types of conditions that could cause this would include HIV/AIDS, many types of cancer, and other rarer conditions.
However, for most otherwise healthy people, problems with with immune system are not really a major driver of gum disease. Conversely, in the absence of a defined immune deficiency, no strategy to "boost" the immune system would help prevent or treat gum disease.
For most of us, gum disease is most closely related to dental hygiene, plaque buildup on the teeth, and the like. It can also be worsened by tobacco use. You are also correct that there are certain genetic predispositions to gum disease, but this does not necessarily change the types of things that are done to prevent it.
Therefore, the best strategy for preventing gum disease is to visit your dentist regularly for general checkups and teeth cleanings. In addition, if your dentist finds any evidence of gum disease at these visits, they may have additional recommendations, which could include "deep" cleanings, additional mouthwash preparations or other oral cleansers, and the like.