Obligate symbionts exhibit high evolutionary rates and extensive sequence divergence. Here, we use the thioredoxin from Candidatus Photodesmus katoptron, an uncultured symbiont of flashlight fish, to explore evolutionary and engineering aspects of protein folding in heterologous hosts. The symbiont protein is a standard thioredoxin in terms of 3D-structure, stability and redox activity. However, its refolding in vitro is very slow and its expression in E. coli leads to insoluble protein. By contrast, resurrected Precambrian thioredoxins express efficiently in E. coli, plausibly reflecting an ancient adaptation to unassisted folding. We have used a statistical-mechanical model of the folding landscape to guide back-to-ancestor engineering of the symbiont protein. Remarkably, we find that the efficiency of heterologous expression correlates with the in vitro refolding rate and that the ancestral expression efficiency can be achieved with only 1-2 back-to-ancestor replacements. These results demonstrate a sequence-engineering approach to rescue inefficient heterologous expression, a major biotechnological bottleneck.