I don't think you can deserialize an object that has already been deserialized. I'm not sure how you would make the contents of 'config' a string containing JSON rather than JSON. Perhaps your JSON should be:
"{\"config\": \"{\\\"user\\\": \\\"toto\\\"}\"}"
Hopefully, this would be deserialized as: {"config":"{\"user\": \"toto\"}"}
And that would make doc1["config"] the string: {"user": "toto"}
which could then be deserialized.
My final purpose was to use the content of "config" and make it a json config file for my board (saved locally on LittleFS). My initial idea was to deserialize down to an struct and then to add the items of the structure to a StaticJsonDocument on wich I can later do a SerializeJsonPretty to the config.json file. Thank to the code given by J-M-L Jackson, I finally understood that ,amazingly enough , my idea is a brain's torture to perform a simple thing: if I do after the first deserialization to doc1 and SerializeJsonPretty (doc1["config"],configfile); it works just as expected.
File configFile = LittleFS.open("/config.json", "w");
if (!configFile)
{
Serial.println("Failed to open config file");
}
serializeJsonPretty(doc1["config"], configFile);
configFile.close();