Thanks Greg, that did produce a backtrace, so indeed wp_redirect is called, but I’m not finding anything with that, it seems to only load core files and run core functions up to the point the my-debug_redirect filter is called. Maybe you could get more meaning from it; the ad url was https://dev-pharo-cattle.pantheonsite.io/classified-cat/pcc-bull-ne and the backtrace:
#0 my_debug_redirect(https://dev-pharo-cattle.pantheonsite.io/)
#1 call_user_func_array(my_debug_redirect, Array ([0] => https://dev-pharo-cattle.pantheonsite.io/)) called at [/srv/bindings/dbeadb5df990493987c80fa808f7267e/code/wp-includes/class-wp-hook.php:300]
#2 WP_Hook->apply_filters(https://dev-pharo-cattle.pantheonsite.io/, Array ([0] => https://dev-pharo-cattle.pantheonsite.io/,[1] => 301)) called at [/srv/bindings/dbeadb5df990493987c80fa808f7267e/code/wp-includes/plugin.php:203]
#3 apply_filters(wp_redirect, https://dev-pharo-cattle.pantheonsite.io/, 301) called at [/srv/bindings/dbeadb5df990493987c80fa808f7267e/code/wp-includes/pluggable.php:1159]
#4 wp_redirect(https://dev-pharo-cattle.pantheonsite.io/, 301) called at [/srv/bindings/dbeadb5df990493987c80fa808f7267e/code/wp-includes/canonical.php:516]
#5 redirect_canonical()
#6 call_user_func_array(redirect_canonical, Array ([0] => )) called at [/srv/bindings/dbeadb5df990493987c80fa808f7267e/code/wp-includes/class-wp-hook.php:298]
#7 WP_Hook->apply_filters(, Array ([0] => )) called at [/srv/bindings/dbeadb5df990493987c80fa808f7267e/code/wp-includes/class-wp-hook.php:323]
#8 WP_Hook->do_action(Array ([0] => )) called at [/srv/bindings/dbeadb5df990493987c80fa808f7267e/code/wp-includes/plugin.php:453]
#9 do_action(template_redirect) called at [/srv/bindings/dbeadb5df990493987c80fa808f7267e/code/wp-includes/template-loader.php:12]
#10 require_once(/srv/bindings/dbeadb5df990493987c80fa808f7267e/code/wp-includes/template-loader.php) called at [/srv/bindings/dbeadb5df990493987c80fa808f7267e/code/wp-blog-header.php:19]
#11 require(/srv/bindings/dbeadb5df990493987c80fa808f7267e/code/wp-blog-header.php) called at [/srv/bindings/dbeadb5df990493987c80fa808f7267e/code/index.php:17]
We do use Yoast SEO Premium for some redirects, but I just disabled it again and confirmed the problem still exists.
Thanks for your help!