I assume that if you need this implementation is because you have a VAT excluded price in Shopify product right?
I've already do that implementation on other stores, but I always write that liquid in every section (collection item template, product, cart) because there's a lot of different classes and other things.
Another solution, a bit tricky, is to create a snippet where you calculate the vat price (you have to send the price to the snippet every time). Then, render it where you need it.
For me it's easier, also to manage, to write these 5 lines of code where I need them.