Cherry picking two points. For general addon development questions you may get more feedback in Kodi forum.
Although it does say that there are modules available for use and pyserial is one of those modules but I don't know the addon id for it.
Following the usual naming conventions <import addon="script.module.pyserial"/> should work.
My addon needs to modify the /flash/config.txt file
IMO this requires some caution. E.g. check of supported HW, already modified config.txt...
From the UI there should be a deinstallation button.