How can I call custom javascript on successful webform submissions through hook_form_alter?
Your 2nd option will work in that :

.Module

function hook_form_alter(&amp;$form, &amp;$form_state, $form_id){
    if($form_id == "webform_client_form_id"){
        $form['#attached']['js'][] = drupal_get_path('module', 'c1') . '/c1.js';
    }
}


Js Code:

jQuery(document).ready(function(){
    jQuery( "#webform-client-form-id" ).submit(function( event ) {
      alert( "Handler for .submit() called." );
    });
});