How to override wp_insert_comment()

You can’t override it, because this function is not pluggable and is a part of WP core. All what you can do is to add your hook for action wp_insert_comment, as you’ve actually done.

tech