After spending days improving the scan from scanning loaded chunks to scanning every single generated chunks, I'm happy to see that it still scans the test overworld in 7 seconds, it is slightly slower on smaller worlds, but it is now guaranteed to not miss any blocks.
I'll still work on it to make sure it doesn't use too much RAM and add extra options for servers to choose, such as only scanning loaded chunks, add a time limit and more once I improve the threading to not use too much CPU
That scan made a 5800X3D go from ~6% to ~50-58% so if the world is big it can use quite some CPU
There are still many bugs to be fixed but the scan should be mostly done