you could just dump the flash and put it on another device (same hardware type).
this works on wemos d1 mini:
esptool.py read_flash 0x00000 0x400000 backup.img
esptool.py write_flash 0x00000 backup.img
this clones the whole device, apart from its IDs (like MAC ADDR).