As for Toyota, Japan has the second highest corporate tax rate in the first world, after the USA. And until two years ago, Japan had the highest rates.
So I don't think Toyota was running the same schemes we see in tax havens.
If (and I have no idea of this is true) Japan doesn't tax transfers from foreign subsidiaries to domestic parents, and the US allows transfers from domestic subsidiaries to foreign parents to be expensed, such an arrangement would avoid taxes entirely, making Japan's tax rates irrelevant.