You can do (define-key key-translation-map (kbd "ESC") (kbd "C-g"))
. I did the same a long time ago and had no problems.
Edit to improve the answer according to the comments:
If you want to keep the ESC
key functionality, you can do
(define-key key-translation-map (kbd "C-<escape>") (kbd "ESC"))
One thing to note is that if Emacs hangs you still have to use the C-g
key for some reason, but that happens rarely.