Actually there is a way to avoid the loop, although it's worse than looping. I just mention it for the 'fun' of it and because some interesting things happen when you feed this with a lot of backspaces.

First of all, it gets really slow after some point, for example:

//echo -s $_backsp(ABCDE $+ $str(a,16) $+ $str(i,18),i)

it echoes "ABC" after a few seconds here. Now the weird part. If you type the above command and then type this:
//echo -s $_backsp(ABCDEFG $+ $str(a,26) $+ $str(i,28),i)
it takes a very long time, which is normal, but doesn't echo the correct result (ABCDE), neither $null: it echoes the previous answer (ABC). PCRE has issues with recursion and there's even a pattern with (?R), which I won't mention here, that crashes mirc, even though the crashes are supposed to have been fixed (not sure on which part, PCRE or mirc, the point is that if a recursive pattern gets out of hand, normally $regsub() doesn't crash mirc anymore. Instead it returns the original string unaffected, as if it didn't match anything).

Anyway, here's the code:

Code:
alias _backsp {
  var %c = \ $+ $base($asc($2),10,8) 
  !.echo -q $regsub($1,/[^ $+ %c $+ ](?R)+ %c |/gx,,%a) $regsub(%a,/^ %c +/x,,%a)
  return %a
}