Thank you for the big help. That does work for me (also without the class_exists( ‘WooCommerce’ ) && ).
The only thing that’s not perfect is: I’m using WP Rocket caching plugin. If the customer leaves the cart page before checking out for a page he’s visited before (say homepage or any page he’s browsed), the cart icon will not show up on those pages)
I guess it’s because the caching plugin served a cached page.
Not sure if this is something I should ask for help here or from WP rocket. I still can’t think of an ideal way to handle this yet. Caching does speed up the site vividly. But things like this often happen…