To solve this, in most countries, companies are taxed VAT instead, so intead of taxing the total value of product at every step, you are only taxing the value the company adds in the process.
Effectively the government is taxing the total value of the product at a fixed rate once but that tax is being split among the companies which helped supply that product proportionally to the value added by each company.