You might be able to use the edit_profile_url
filter:
add_filter( 'edit_profile_url, 'wpse419568_user_profile_redirect', 10, 3 );
/**
* Filters the URL for the user profile.
*
* @param string $url The profile URL.
* @param int $user_id The user ID.
* @param string $scheme The URL scheme (eg http, https, login, etc.).
* @return string The filtered URL.
*/
function wpse419568_user_profile_redirect( $url, $user_id, $scheme ) {
// Don't change the URL for admin users.
if ( ! current_user_can( 'manage_options' ) ) {
// Assumes that the profile URL uses the User ID. Adjust to suit
// your site's use case.
$url="/members/profile/" . absint( $user_id );
}
return $url;
}
Note: This code is untested and comes with no guarantee it will work. It’s meant as a starting point, not a finished solution. Test it on a disposable / test site first.