Who knows about long visa overstay? I mean, imagine you stay six more months than permitted on your passport… What can happen to you?
In order to answer this question I would have to know about your nationality. In my experience, the two most common types of “overstay” situations are in regard to (1) foreigners and (2) overseas Chinese. I will discuss these in more detail below.
In the case of foreigners, if you have overstayed your visa, the Police will want you to leave. You will have to pay a fine of a few thousand NT$. You are best advised to prepare a written statement of what you did during your overstay period, where you lived, etc. Normally, after you leave you will be blacklisted for the amount of time that you overstayed your visa. However, if the Police get some evidence that you have been working illegally, they will double the period of blacklisting. In my years of experience in working with Taiwan immigration matters, I have never heard of a foreigner having his “overstay” status cancelled due to extenuating circumstances.
In the case of overseas Chinese, in general the situation is the same as for foreigners. However there is another possibility, which would be to institute legal proceedings to have the “overstay” status cancelled, and apply directly for an ID card to live in the Taiwan area long term. This is very difficult, and would probably take two years or more to complete, however I suspect that it could be done.
Any risks of detention?
At the present time I am unaware of any criminal penalties for a “visa overstay”, this is simply an administrative matter. There should be no problems if you give the Police the appearance that you are acting “in good faith”. Hence, have the necessary paperwork ready, buy your airplane ticket in advance, visit the tax office to see if you have any liability there, have a cooperative attitude, admit to your “guilt”, etc.
How about the tax office? What is it exactly? Will I be ask about tax when leaving the country (considering I work legally)?
If you have a resident visa based on employment, and an ARC based on that, it is certainly true that the validity of those documents and the validity of your work permit will be the same.
If you have overstayed, your work permit will have expired as well, hence it is not possible that you are still “working legally”, although indeed you might have been “working legally” before.