Thanks for that update. I’m very pleased you have finally got everything working better.
Sometimes, when we have had a site running for many years I also find that it can be easier to take it all down and start again. In English we call it “spring cleaning”, so everything is tidy before summer starts.
FYI I still have the database file and all the system files if you need them for test. If you do not want them I will delete it all.
It would be nice to study that and see if the fault could be found. But really I am unlikely to find the time, so best that you delete it all. It seems certain that the issue was unique to your situation, not something all users need to be concerned about.