I agree with @fssbob it is nonsensical for blame to be placed on The Events Calendar.
There is a reason PHP has conditions to check if functions/classes/methods exist before calling them, they can be very useful when integrating with another plugin where you do not control what they deprecate.
After some testing and investigating the Yoast code, the errors on our sites (memory exhaustion of 512MB leading to 504 Gateway-Timeout) were being triggered when Yoast is trying to generate the Structured Data for Events.
These sites were built using the DIVI builder with premium versions of TEC and Yoast both installed at latest version. WP is running 6.1.
Yoast is checking tribe_is_month() before trying to pull the Events and generate the schema. Within this condition they are calling the deprecated The Events Calendar static method. In our cases the tribe_is_month() condition was always returning true on all pages and Yoast was trying to retrieve ALL events from the database before adding them to the schema markup.
Rather than editing the Yoast SEO plugin, I was able to locate their own filter they are hooking into if The Events Calendar is active and remove_all_filters from this hook. It only seems that this hook is used by Yoast for The Events Calendar integration during the structured data generation. Our solution was adding this to the theme functions.php file:
add_action( 'wp', 'thebaum_filter_for_one_action' );
function thebaum_filter_for_one_action() {
remove_all_filters('wpseo_schema_graph_pieces', false);
}
This not only prevented the timeouts but had a considerable improvement on overall page load times. The required structured data was still in place so Google Search Console should not throw any errors. This function just removes the Event portion form the Yoast schema output. The Events Calendar schema is still output correctly.
The other general problem with this issue is the fact that this part of the integration does not need to exist and adds a conflict to the HTML output. The Events Calendar makes it very clear that they handle structured data output for Events TEC Structured Data .
If Yoast is able to add condition checking and remove this part of their integration it should help minimize future issues.