Filter wp_redirect() to stop redirect under certain condition

As you can see from the source code, wp_redirect always ends in a PHP header request, except if the location is empty, because then it doesn’t know where to redirect. So you can indeed use the wp_redirect filter. If you return an empty string under certain circumstances, the redirect will not happen.