People are so sure he made the wrong choice when he fled to the Ecuadorian embassy, but I wonder how they can be so sure. At the time, his biggest worry was to get assassinated or get snatched off the street and end up in a secret CIA torture prison. Neither of these fears were unjustified. Add to this the belief that US maximum security prisons are blatant violations of basic human rights and the belief that the UK and Sweden are close allies of the US, and his actions made perfect sense. His notoriety and his choices saved him from either of these fates, albeit at a high price.
Did he make the right choices? Who knows. There is always a lot of counterfactual reasoning involved.