Partial solution. Somewhat adapted from https://sourceforge.net/p/asymptote/discussion/409349/thread/3fc73fb8/ .
If you think about it, the size of the label relative to user coordinate is not determined until the very end of the program --- which definitely causes a problem. So, this is only a partial solution that it assumes unitsize is fixed.
Basically, it constructs 5 label objects, then for each object it is put into a picture, then its size is measured with min()/max()/size() in order to determine the midpoint of the bottom edge of the box.
Note that in order to make min() etc. return correct value, unitsize() of the sub-picture must be set correctly.
Unfortunately, this method disrupts the spacing --- I'm not sure how it can be fixed.
var unitsize=1cm;
unitsize(unitsize);
string template="$\underbrace{1}$";
picture a;
unitsize(a, unitsize);
// draw the labels, and compute the coordinate of the bottom points along the way
label(a, baseline("$\underbrace{123}$", template), (0, 0), align=NE);
pair bottom1=((min(a, user=true).x+max(a, user=true).x)/2, min(a, user=true).y);
label(a, baseline("$+$", template), (max(a, user=true).x, 0), align=NE);
real u=max(a, user=true).x;
label(a, baseline("$\underbrace{456}$", template), (max(a, user=true).x, 0), align=NE);
pair bottom2=((u+max(a, user=true).x)/2, min(a, user=true).y);
label(a, baseline("$=$", template), (max(a, user=true).x, 0), align=NE);
real u=max(a, user=true).x;
label(a, baseline("$\underbrace{789}$", template), (max(a, user=true).x, 0), align=NE);
pair bottom3=((u+max(a, user=true).x)/2, min(a, user=true).y);
// compute shift such that the text is centered at x = 4
pair ashift=(4-size(a, user=true).x/2, 3);
// draw the text on currentpicture
add(shift(ashift)*a);
// some other text for comparison
label("$\underbrace{123}+\underbrace{456}=\underbrace{789}$", (4, 4), align=N);
label("$123+456=789$", (4, 5), align=N);
// draw the arrows
draw(ashift+bottom1--(1, 1), Arrow);
draw(ashift+bottom2--(4, 1), Arrow);
draw(ashift+bottom3--(7, 1), Arrow);
label(baseline("$a$"), (1, 1.1), S);
label(baseline("$b$"), (4, 1.1), S);
label(baseline("$c$"), (7, 1.1), S);
Output: 