The answer is simple: YOUR DOCKER CONTAINERS WILL NOT SURVIVE THE FACTORY RESET.
You have a major problem. The strategy that I use from the beginning of using docker is:
1.- Saving everything related to docker in /storage/.config/dockers:
- Always use the SSH command line to launch new containers. This command line is saved in a script. For example: my launch command for docker tvheadend was saved in /storage/.config/dockers/9981-tvheadend.sh
- Forgetting to use kodi addons to launch new containers.
- All settings for each of my containers are in /storage/.config/dockers. For example: my tvheadend settings are in /storage/.config/dockers/tvheadend.
2.- Every three days I do an automated backup using cron on a different drive from the LibreELEC boot disk, deleting the backups older than 14 days (my old memory only remembers what I did yesterday and the day before yesterday). On the first day of each month I make an additional backup deleting the oldest ones of 3 months.
In this way I have no problem in recovering all or part of the system after a factory reset.
There are no magic solutions for your problem, perhaps saving the data directories of your containers before doing the factory reset may be the solution. Go thinking about using another method, good luck!