How to override theme’s public static function inside of a trait?

I believe plugins are loaded before the theme (see here “plugins_loaded” vs “setup_theme”) so the error is occurring because Helper has not loaded yet.

One thing you can try is to create a child theme and add the class override there (via functions.php).

You can also provide your override after the theme has loaded by hooking into “after_theme_setup” or “init”. There are more details in this post here: How to override a theme function (within a class) using a plugin

tech