Here is a recursive let/lambda function that works:
=LET(f, LAMBDA(f,n, IF(LEN(n)=1, n, LEFT(n) + f(f, RIGHT(n, LEN(n)-1)))), f(f,B2))
And here is non-recursive function that will do the same thing:
=SUM(--MID(B2, SEQUENCE(LEN(B2)),1))