The fixes suggested here should solve to a large extent the problem
of deleting text you wrote (however, they do not help in creating other
text :)).
There is a small bug in the whole setting: if you're using the
COLORTERM trick and you start
xterm from
gnome-terminal, the former will get
TERM set to gnome. This inconvenience is,
of course, mostly harmless, and does not occur if you simply started
gnome-terminal with TERM suitably
set.
Another nontrivial problem that essentially has no solution is the
one concerning remote connections: if you connect to a host whose terminal
database is incoherent with yours, you will have to set up things
manually.
Finally, it should be noted that the fixes will not work for broken
applications (for instance, applications ignoring the
kbs key capability). There is little to do in this case,
as fixing for one broken application will likely break all well-behaving
ones.