If exile was seen as ruinous enough in the public eye, that could provide a humane alternative to imprisonment.
Racist sentimemts could be exploited for this in a very humorous way. Imagine hackers being exiled to Mexico, and being let in on the precondition that they spend the first X years working on improving Mexico's public infrastructure.