This topic has come up here: Create Shapefile with auto increment primary key in QGIS
My suggestions would be:
1) SQLITE / SpatialLite databases support auto-incrementing on a field set to INTEGER PRIMARY KEY:
On an INSERT, if the ROWID or INTEGER PRIMARY KEY column is not
explicitly given a value, then it will be filled automatically with an
unused integer, usually the one more than the largest ROWID currently
in use. This is true regardless of whether or not the AUTOINCREMENT
keyword is used.
Each time you edit/create polygons, you can fill out their attributes, and SQLITE will give it an incremental unique value in the field you have set to INTEGER PRIMARY KEY type.
When you're ready to export to GEOJSON, you're all set with your UNIQUE ID's.
2) If using Shapefiles, create an OBJECTID field of INTEGER type and use a field calculator expression to populate that field each time you edit/create polygons and need to export them. You will lose the original ID a polygon once had, but you this is the only way to achieve this using .SHP. (I will have to find the field calculator expression).
PostGIS is another data source you might want to explore, though more of a heavy lift than SQLITE, you might find value in such a system as you move forward...