FCPX relinked to wrong file, won't let me relink to correct one
So my sony A7III camera names files the same way after the card is formatted. I worked on a big six-day shoot project and ran out of space, so I moved it to an external SSD. When I batch relinked the files from the library, Final Cut somehow mistakenly relinked a big part of the clips from Day 2 to clips from Day 5 (to give an example - Shot 0005 from Day 2 got relinked to shot 0005 from Day 5), causing over 30 different events and projects to get screwed up and linked with the wrong shots.
I realized this is the problem and tried relinking the right files, but it does not allow me to, as the clips are shorter than the ones that it's wrongly relinked to now. I am now looking for a solution but can't seem to find any...
I'm in big need of help as I don't want to have to redo all the projects by hand :(
MacBook Pro