Writing erasable code My phone number (which I will not be sharing here) has a neat property where there is a two digit number, which when iteratively removed from my phone number will eventually remove all the digits.  For example if my phone number were
abaababbab

Then by repeatedly removing ab we would eventually get nothing (I encluse the string I am removing in brackets to make it clear)
abaababb[ab]
abaab[ab]b
aba[ab]b
ab[ab]
[ab]

Now to generalize this property lets have any string.  A &quot;minimal eraser&quot; of that string will be the smallest substring such that if iteratively removed it will eventually make the string empty.
Some examples at the bottom.
Task and Scoring
Warning: This challenge is not code-golf.  Do not assume it is without reading the scoring
Your challenge will be to take a string as input and output a minimal eraser of that string.
Your answers will be scored by taking them as a string of bytes and calculating that string's minimal eraser.  The length in bytes of that eraser is your score, with lower being better.
Your answer must support strings containing all printable ascii plus any characters that appear in your program.
Test cases
abaababbab -&gt; ab
baababbab -&gt; baababbab
baababab -&gt; baababab
echoecho -&gt; echo
ototoo -&gt; oto
ibiibibii -&gt; ibi
aabaabaa -&gt; abaa / aaba
Python 3, score ... 48 29  20
+1,eval(bytes([57]))

A completely different approach from the last 2 versions (and also result in manageable generated program). Check out the revision history for some (possibly) interesting ideas.

Given an arbitrary Python program:
print(1)

it can be transformed, without changing the behavior:
exec(&quot;print(1)&quot;)

eval(rb'exec(&quot;print(1)&quot;)')

eval(bytes([101, 120, 101, 99, 40, 34, 112, 114, 105, 110, 116, 40, 49, 41]))

The number list is getting long, so I'll use a shorter list for demonstration. Note that only printable ASCII characters can appear in the string representation and the first character is e, so the first number is 101 and all numbers are at least 32.
eval(bytes([101, 32, 32]))

Rewrite the first number to 57+1+1+1+...+1+1+1, the rest into 9+1+1+...+1; then add some ,9 at the end of the list. This is always possible because of the conditions mentioned before, and the program's behavior is unchanged because the byte 9 is \t, a whitespace character.
eval(bytes([57+1+1+...+1, 9+1+1+...+1+1, 9+1+1+...+1, 9, 9,..., 9]))

The number of ,9 added must satisfy that the total number of 9s is equal to the number of +1.
Then replace all the 9 with eval(bytes([57]), and prepend +1,.
+1,eval(bytes([57+1+1+...+1,eval(bytes([57])+1+1+...+1+1,eval(bytes([57])+1+1+...+1,eval(bytes([57]),eval(bytes([57]),...,eval(bytes([57])]))

Done! It's easy to see that this string has the eraser string +1,eval(bytes([57]).

It's trivial to see that there exists a Python snippet that solves the given problem.

g=lambda s, e: not s or any(
&#9;s[i:].startswith(e) and g(s[:i]+s[i+len(e):], e)
&#9;for i in range(len(s)-len(e)+1))
f=lambda s: min((s[i:j] for j in range(len(s)+1) for i in range(j) if g(s, s[i:j])), key=len)
print(f(input()))

Try it online!