Sure it's possible that Sten survives.
It is possible that the Templars hitched his cage to their horses and dragged him with them through the countryside for no reason.
It is possible that Flemeth was flying over Lothering on her way to save Hawke and decided to let him out for giggles.
It is possible that another space baby fell on Lothering, just happened to crash into Sten's cage in such a way the he was released, and he raised the child according to the Qun.
It is possible that the Revered Mother trips during the evacuation and just happens to drop the key within Sten's reach and he decides "Eh, why not?"
It is possible that Hawke and/or Carver decide to let the murderous oxman, who tore people they knew apart with his bare hands, out of his cage.
It is possible that Sten completely loses control of himself at the eleventh hour, Hulks his way out of his cage, cuts a swath of destruction through the entire Darkspawn horde to make his escape, and somehow finds a ship's crew in Gwaren willing to let him work for passage to Par Vollen.
Lots of things are possible. Not many are likely.
Given our interaction with Sten, we know that until the Warden convinces him to come along, Sten wants to stay in that cage. He has lost his squad and sword, so he can never go home. He murdered innocents who sheltered him and feels the stain of that. He is a failure in basically every way, from his point of view. Even the Warden doesn't convince him to change his stance on dying, just the method. It is Sten's decision to die in Lothering. It is far more likely that he stands by that decision and waits for the darkspawn to arrive, at which point he is killed.