Unfortunately, there is no information about it in English on Taiwan Rail website.
According to its Chinese website, you should download registration form and fill it out, and check the train schedule that meet your need, but you can only take 自強號 (Ziqiang Hao) No. 1013, 1019, 1025, 1031, 1061, 1010, 1012, 1016 and 1032.
When you and your doggie start your journey, you have put your doggie in a cage whose size limitation is 170cm by length, width and height. With registration form, you have go to register your doggie in cage in luggage office of Taiwan Rail Stations of Hualian, Luodong, Yilan, Taipei, Taoyuan, Zhongli, Xinzhu, Maoli, Fengyuan, Taichung, Zhanghua, Jiayi, Xinying, Tainan and Kaohsiung. And you only can pick it up at the abovementioned stations.
You probably need someone who can speak Chinese to help you with it.
Sorry...I am too sick to translate it well.