Submit handler in hook_form_alter not working in d8
What you are doing looks like it should work.

Doing an echo is undetecable in the submit handler, since Drupal will do a redirect after the POST request and thus clearing all of the output generated but Drupal in the actual submit handler.

A simple way to test if the submit handler is called or not is to insert a die()

Reasons for submit handler not being called could be:


You submit the form with a button you haven't added a submit handler on and that already have one or more attached to it.
Another alter hook removes your submit handler (unlikely)