All options are too far away to predict which will come first, or with what side effects.
(In practice, almost everything over 5 years away, even when already in early human trials, has this property; the only reason the Covid vaccines happened faster is that everyone was willing to throw unlimited resources at the problem and do simultaneous tests on all candidates, and in a pipeline, rather than cost-efficiently and slowly like everything else has been).
IIRC, there's no current way to scan even a single living synapse/synaptic cleft/dendrite combination to read out the corresponding connection strengths, let alone for the whole brain, so we can't yet scan a brain — but if we could do that, writing it back to a fresh blank one currently seems(!) like the easy part, as neurons change shape and grow in response to electrical gradients.
One non-measuring idea is to gradually replace portions of the brain with artificial blanks, relying on some sort of holistic (or holographic) redundancy where the "damage" is repaired by neighbors.
This, er, Brain of Theseus would retain operational patterns even if the individual cells have been replaced.
A variation on that would be too do it stochastically, constantly substituting a miniscule percentage of cells evenly across the entire brain.
(In practice, almost everything over 5 years away, even when already in early human trials, has this property; the only reason the Covid vaccines happened faster is that everyone was willing to throw unlimited resources at the problem and do simultaneous tests on all candidates, and in a pipeline, rather than cost-efficiently and slowly like everything else has been).
In-vitro tissue culture is already a thing (including brain organoids, if you want a brain to control a robot: https://en.wikipedia.org/wiki/Cerebral_organoid), as is 3D bio-printing.
IIRC, there's no current way to scan even a single living synapse/synaptic cleft/dendrite combination to read out the corresponding connection strengths, let alone for the whole brain, so we can't yet scan a brain — but if we could do that, writing it back to a fresh blank one currently seems(!) like the easy part, as neurons change shape and grow in response to electrical gradients.