If you edit values in config.txt which are simultaneously set with
snap set system pi-config.foo=something, then upon the next snap refresh or the next
snap set (even for an unrelated system config, not necessarily something pi related), you could have you manual changes undone or overwritten by the ones that are saved in snapd. You are best off having no config set for pi-config on the system if you wish to manually control config.txt entirely.
Regarding if a gadget asset update would overwrite the config.txt, it is technically possible via gadget asset updates, but these must be manually opted into by the gadget snap maintainer when they update the gadget by adding specific values to the gadget.yaml referencing which files should be updated. By default just changing the assets themselves (like the DTBs, overlays, config.txt etc.) and rebuilding and uploading a new revision of the gadget snap will not update the files on existing installations.
Additionally, it is highly unlikely that Canonical’s gadget snap maintainers would ever actually deliver a gadget asset update to the config.txt even if technically possible, specifically because of the issue with it being modifiable via snap config settings, and so it would have to be done very carefully and probably require changes in snapd so that if the config.txt was updated by a gadget asset update, then snapd would automatically re-apply the config on top of the config.txt before rebooting to apply the effects of the gadget asset update. The complexity here means we are extremely unlikely to do this except perhaps in the most dire of cases like where not doing so means bricked devices or critical security vulnerabilities which would be very surprising to see happen at the level of config.txt.