Ceiling fans contain unconventional motors. They must run slowly, hence their design is different from typical AC motors.
From your photograph, the windings are numerous and complicated, more so than in a conventional AC motor. This would discourage me from trying to unwind and rewind all those wires.
Like yourself, I have never seen an explanation as to how ceiling fan motors operate. I understand that inefficiency is designed into them, so that they run slowly. I suspect that some windings are oriented so current flows in an opposite direction from other windings, or in different phases. Perhaps different manufacturers achieve this in different ways.
I'm looking at a spot where it appears several wires were burned and separated. Access looks very difficult. If it were just one broken wire, it should be possible to lift away the two ends, and splice them together with a spare length of wire. Instead it appears to be many broken wires, which may be impossible to fix.
If I were determined to save the fan, I would cut away blobs of melted wire, and separate all the ends. I would test each wire with an ohmmeter, for continuity to the power leads. I think only two of them should still be connected to power. The other wires are disconnected turns, unrepairable (unless you want to go to extreme effort to match them up). I could be wrong.
Connect the two wires which show continuity to the power leads. This eliminates several windings, and reduces resistance of the motor. It will draw greater current and generate more heat. This could make it dangerous to operate, and I only suggest it on the chance you have already considered doing this, and know how to be careful about checking for overmuch current draw, and heat generation.