Is the production of porn legal in Taiwan for expats? Can you recommend a good lawyer?

If you and all people involved have proper work permit or status, all are legal.
There is at least one Taiwan production company that hiring both Taiwanese and foreign actress for the movies.
Google “JVID” for research purposes.