[NOTE] this answer was heavily edited to follow the updates of with-editor developments. Most comments likely won't make much sense anymore. There are some new comments which do make sense.
Magit contains a library named with-editor available at https://github.com/magit/with-editor which allows you
to use your local Emacs as an $EDITOR on remote machines over TRAMP.
Another alternative is https://github.com/habnabit/remote-emacsclient, but it seems more complicated & less generic.
The simplest way to install with-editor is through MELPA:
M-x package-install with-editor
Otherwise, just grab https://github.com/magit/magit/blob/master/lisp/with-editor.elhttps://github.com/magit/with-editor/blob/master/with-editor.el somewhere to your load path and require it (it also depends on dash).
Then, simply start shell, eshell or ansi-term and do the following:
M-x with-editor-export-editor
It'll ask you which $EDITOR you are interested in, just press enter for the default EDITOR variable. Then inside the shell you can type crontab -e and edit your crontab within emacs. Press C-c C-c to save the crontab or C-c C-k to cancel editing.
If you want a more permanent setup:
(add-hook 'shell-mode-hook 'with-editor-export-editor)
(add-hook 'term-mode-hook 'with-editor-export-editor)
(add-hook 'eshell-mode-hook 'with-editor-export-editor)
Alternatively, you can use M-x with-editor-async-shell-command crontab -e RET for quick commands.