I have tried prefrences.h for storing strings. To my suprice I found that it uses String in the code. As far as I know this is a no-no! String is unstable and might give unpredictable results.
Now I am trying to use SPIFFS instead. Does anyone know if String is used in SPIFFS.h or its dependencies?