Does it make any difference to taxes, if a foreigner acquires existing stocks of a domestic company or acquires new stocks through capital increase for a joint venture?

There are no tax benefits for foreign investment made by means of acquiring existing stocks, but tax deduction is applied for foreign investment through capital increase.
If selling existing stocks, the seller has to pay the acquisition tax (corporate tax) and transaction tax for the transfer of shares. The acquirer does not have to pay any special taxes. One exception is for a corporation not listed on the stock exchange, where acquisition tax is levied for the possession of more than 51% of total stocks.