Moving away from MD5: Where to declare the custom global $wp_hasher?

What I would do is this: Since wp_hash_password() is a “pluggable” function, create a simple plugin or MU-Plugin and define a function called wp_hash_password() in that plugin/mu-plugin. WordPress will use your function instead of the core function.

Just copy the original code into your plugin/mu-plugin and change the one relevant line.