The jQuery textSelection setContents method works to set the entire value of an element, e.g.:
$( '#wpTextbox1' ).textSelection( 'setContents', 'foo' );
However, this doesn't work in Firefox when setting the contents to the empty string:
$( '#wpTextbox1' ).textSelection( 'setContents', '' );
This looks like it's a bug with Firefox, and has been reported here: https://bugzilla.mozilla.org/show_bug.cgi?id=1858590
An example of that bug in action is here: https://codepen.io/freosam/pen/YzdgRGY