"abcd111" -> "abcd1"
"aaaa22122bbbb" -> "aaaa212bbbb"
"a8n64m33xxx000x0" -> "a8n64m3xxx0x0"
str.replace(/(\d)\1+/g, '$1')
// или
''.concat(...str.split(/(\d)\1+/))
// или
Array.from(str).filter((n, i, a) => Number.isNaN(+n) || a[i - 1] !== n).join('')
// или
[...str.matchAll(/(\D+)|(?:(\d)\2*)/g)].reduce((acc, n) => acc + (n[1] ?? n[2]), '')