Regarding `rm`, I usually have something like this setup in my bashrc/zshrc:
rm () {
mv "$@" ~/.trash
}
So any time I use rm, it actually just moves it to ~/.trash instead. Not fool-proof nor perfect, but have saved me at least once so found it to be good enough for now.