Let's say chopping down trees costs $100, turning wood into chairs costs $100, and selling chairs also costs $100. Let's assume companies are non-profits (to make things easier).
Company A Spends $100 to create a unit of wood.
Company B spends $100 for a unit of wood, and spends $100 to make that into a chair, and sells for $200.
Company C spends $200 to buy a chair, spends $100 to have a nice shop and friendly sales people, and sells for $300.
Now let's add taxes! We'll do 10% to make the numbers easy.
Company A pays $10 taxes.
Company B pays $20 taxes.
Company C pays $30 taxes.
Total taxes paid on a chair bought at company C: $60.
Now we introduce company D. Company D is large, and can produce its own wood, has its own chair-making factory, and has its own shop. A chair at company D also costs $300. But company D only has to pay $30 in taxes!
In the real world, company D will immediately drive companies A, B, and C out of business (or acquire them!) because it can sell its chairs cheaper, because it only had to pay taxes once.
The problem with your suggested solution is that companies owning their entire production line get an immediate tax-advantage over smaller companies who do not. If implemented, there would still be legal tax avoidance by simply forming bigger companies.
Apropos... popular macro-economic theory is based more or less on the idea that the economic financial system is not sensitive to conditions like these. As you just showed, it's actually quite trivial to demonstrate that it is.
All retail business will be the first to die. Because when your supermarket charges you $1 for milk, they would have to pay 20 cents (or whatever your tax rate is). They also have to buy the milk. Since margins are typically around 2% or 3% in this segment, any tax >3% will make retail impossible or dramatically increase prices.
So congratulation for effectively demonstration the danger of this ignorant trend of mindless hate of "government", and "experts": Those that believe they have easy solutions don't even notice when what they're proposing would cause widespread famine.
Taking on extra employees or switching to a local producer will reduce your tax bill. The government is then collecting payroll taxes from the new employee so it doesn't miss out too much.
If you're a global coffee chain that didn't make any 'profit' because you licence your logo from a subsidiary based in Switzerland. Well, that can't be deducted so you will be paying tax.
In that case it suffers from the same failures as OP: Starbucks would seize to exist because coffee still makes up 50%+ of their cost of doing business. And it adds an extra layer of "but why?" with an artificial distinction between domestic and foreign-produced goods.
Set a single income tax rate for all businesses that they pay on revenue, not on profits. Do the same for individuals as well. No deductions, no credits. If you make $200k a year, your taxes are the same whether you have zero dependants or twelve.
Similarly, if you made $200M in revenue, you pay taxes on the $200M.
This is a little difficult because I have no idea how to account for Google putting ads for Pixel devices on Google search results or Facebook peddling their Alexa device in Instagram but there must be a way to force companies to report this as revenue. No idea how this will work for the Google home page for which there is no established price structure.
We can still keep a progressive tax regime. Maybe 0% income tax for revenues under a certain amount and higher taxes for higher brackets. But people never want to listen. They keep saying oh grocery stores will go out of business or whatever. I think it is pretty silly. We can't have it both ways. If we want to prevent legal tax avoidance, we must act to prevent tax avoidance.