Finally it really took 8 hours but everything is fine now. I suspect that although I set Optimise storage in photos last month, somehow the photos are still there on the phone, and although I saw that I only had 200GB of data on the device, actually it was nearly 500GB.