For simple non volatile storage of a struct like you want, you should also take a look at Preferences.h which is a part of the Arduino core for the esp32. It uses a simple key value pair method for nonvolatile storage. You will find many online examples of how to use Preferences.h. For the struct, the putBytes() function is what you will use, and if you look at the library documentation you will see all the other put/get functions available.
Here's a simple example of the use
#include <Preferences.h>
Preferences prefs;
int dataStore[3] = {12345, 45689, 78901};
int dataRetrieve[3];
void setup() {
Serial.begin(115200);
prefs.begin("IntegerArray"); //namespace
//bytes can be put/get in namespace directly see prefs2struct example
//prefs.putBytes("IntegerArray", (byte*)(&dataStore), sizeof(dataStore));
//SavedIntegers is Key
prefs.putBytes("SavedIntegers", (byte*)(&dataStore), sizeof(dataStore));
prefs.getBytes("SavedIntegers", &dataRetrieve, sizeof(dataRetrieve));
Serial.println(dataRetrieve[0]);
Serial.println(dataRetrieve[1]);
Serial.println(dataRetrieve[2]);
}
void loop() {}