How to recover from the loss of cloud storage

Inadvertently deleted the cloud storage behind hundreds of element sets and more than thousand elements. The images were backed up elsewhere so not lost. I have to restore the repository and looking for an automated way.
The images are stored in a hierarchical folder structure so it would be possible to map the image sets to the metadata structure, I think.
I understood batch editing is not usable to replace (the now non-existent) cloud images with the same images from elsewhere.

However, I could imagine a migration scenario where the first step would be some Export(s), then editing / mapping the file sources and the importing the modified CSV in the same old or a new repository. Please help me with the necessary details. TIA