An alternative: If you call a stopquest command when your quest is completed, all scripts tied to that quest will be terminated and all topics removed.
This. Put it in the result script for the final quest stage.
However, you might want the opposite effect, which is topics that are only available after the quest is done, e.g. comments on the player having achieved whatever they did. In that case, put those in a second quest without any stages that you start in the same result script, just before the StopQuest for the main one. If the first quest has multiple outcomes, then tests on the final stage reached could control what's said. Bethesda did that for a few, so there are XxxFIN quests that run only after quest Xxx is finished.
The advantage of a separate quest is that all the scripting for the main one can be stopped, along with the quest itself. Its only purpose is to be a container for the dialog.