I don’t think there is a config for that but I can think of two solutions
First is to start docker and have a docker ps | xargs docker stop (on mobile so needs to be written appropriately), which could be quick enough
Alternatively the nuclear option: move or rename the docker folder ( usually /var/lib/docker), “reinstall” docker so it recreates the folders and once done you can just swap them back