Here are a few leads, they are independent from one another.
Forcefully reimporting everything
Warning: Make a backup first!
miss_bisque mentioned having the project under git, but if someone else finds this answer, make *at least one copy* of your project folder somewhere safe before trying this.
Run the following command in the root of the project folder (containing project.godot).
find . -path *.import -delete
Open the project inside the Editor and wait for the imports to finish.
If the Editor fails to reimport a specific file and goes into an import death-loop, you can selectively restore a .import by copy pasting it, or with git by doing a
git restore <filepath>
Recreating a project.godot
Create a new project inside the project selector, close the Editor, then copy everything to the new project except the project.godot. If it works again, you can manually put in all the information back. Note that project.godots are fairly readable, meaning you can read the corrupt one to know what to enter back graphically.
Knowing the exact version which caused the issue to start, you can look though every file that changed.
git checkout <good version's hash>, check that it works, and then, for every file that changes in the following commit, do a
git checkout <first bad version's hash> -- <file's path> and check it it breakes the project. (You can go faster by putting folder paths, and then restarting with entries in the incriminated folder).
You should end up with the exact file that caused the issue.