Against my better judgment, while the wound was still too fresh I delved into that scene trying to analyze exactly what happened.
Just to make it clear I used past/vision for when bran is in the past having a vision of his father Ned Stark and his grandfather Rickard Stark, while Ned is saying goodbye and going to the Vale as a ward of Jon Aryn (where he will meet Robert Baratheon, another ward of Jon Aryn and become friends)
Present is Bran in the cave, being attacked by the weights and the white walkers.
Wylis is Hodor in the past, in the vision.
Hodor is Hodor in the present with Bran and Meera escaping.
Let us start; Bran and the Three Eyed Raven are in a vision, seeing the past. They are witnessing the moment (at least 30-40 years before the present time) when young Ned Stark was being sent to Jon Aryn. This is a special vision for several reason:
1- Before going Three Eyed Raven tells Bran “you are going to be me”.
2- when Bran is pulled away from the tree root by Meera the vision does not end, like it did before with the White Walkers when the moment Bran let go of the tree root, the vision ended.
3- Three Eyed Raven can hear and see what is happening in the present, while he is in the vision (he tells Bran to do as his friends are telling him –Meera was calling for him to warg into Hodor to escape). Three also knew exactly when the Night King was in front of him and about to kill him, so he told Bran goodbye.
All hell break loose, the white walkers and their Night King break through the Children of the Forest magic and they are in the cave. Meera tries to wake Bran up, without success, so she screams at him to warg Hodor. Bran can hear Meera from inside the vision and Three Eyed Raven tells him to listen to hear. Thus, Bran look at Wylis, who is totally oblivious to Bran, in fact looking away from him, and Bran use Wylis (in the vision/past) as a conduit to warg Hodor in the cave. Indeed, Hodor, in the cave, has his eyes turn white and then back to normal, and he spring to action. This sequences (eyes turn white, then back to normal and then Hodor moves, was repeated several times in the past when Bran warged into Hodor. For example, check in season four when Bran escaped the Black Watch traitors at Crasters)
Therefore, we have Bran inside a vision with Three Eyed Raven, looking at Wylis (young Hodor) and using his power to warg Hodor in the cave. Hodor picks up Bran sled, Meera puts Bran on it, removing his hands from the tree roots. Bran doesn’t wake up, unlike previous visions. The events continue, and after the sacrifice of Summer and Leaf, they arrive at the Door.
Here, Bran still warging Hodor, break through the door, and Meera seeing the horde of weights, asks Hodor –still warged by Bran- to Hold the Door. Bran, hearing and probably seeing, from his vision what is happening to Meera, Hodor and his body, watches on horrified.
At this point, Hodor is holding the Door and Meera keeps screaming at him to hold it. The pressure becomes too much and Wylis (in the vision/past) is overwhelmed. Wylis, turns to Bran, seeing him for the first time, and start hearing Meera screams “Hold the Door”. His eyes turn white, and he falls on the ground seizing. It seems that Wylis has been warged too, and now his mind can see, hear, and experience what is happening to Hodor holding the Door. Poor Wylis mind is warged along with Hodor’s at the door, being shredded alive by the weights.
There in the Land of always winter, under the Weirdwood tree of the Children of the Forest, Hodor sacrifices his life, and the mind of his younger self to save Bran Stark, and maybe the fate of all westeros…