‘Unsupported Operand Types’ error stemming from taxonomy re-writes with PHP 8.1

It looks like you’re passing the string 'EP_PERMALINK' instead of the constant (which is an alias for an int) EP_PERMALINK. It’s possible that PHP 8.1 is stricter than 7.4 when it comes to variable types.

WP_Rewrite::generate_rewrite_rules() definitely expects an int for the 2nd parameter ($ep_mask).