I don't know if your version of
sed will be binary-clean or if will choke on what it thinks are really long lines in its input, but barring those issues, editing the string in-place should work. To see whether it does, compare the old and new versions with
cmp -l. It should tell you whether or not the only three differences between the two files are those 3 bytes.
Editing strings in a compiled executable will indeed work if the strings are of the same length, but it will almost always also work if you are shortening the string, due to the way that strings work in C. In C strings, everything after the
NUL terminator does not count, so if you write a new
NUL terminator before the position of the old one, you will effectively shorten the string.
In general, there is no way you can lengthen a string using this hack.