The Taoyuan Metro that goes from TPE Airport to the HSR takes touchless credit cards as payments at its gates. So, no need to buy any ticket for the TY Metro. HOWEVER, if you are in Taiwan for any period of time, you might want to get an EZCard (stored value card) which is accepted by multiple train and bus systems and at many stores. You can buy that at the TY Metro station.
Looks like the BR CDG flight gets to TPE around 7h. So, that is OK. The Taoyuan Metro does not open until about 6 AM and the HSR is even later.
If you arrive on a weekday, the trains will be crowded. Lots of people commute on the HSR. Business Class (there is no F) might be better but I am not sure.