That is one of the criticisms againts TRA: that a lot is invested in infrastructure, but not in maintenance.
There is also a serious lagging in human resources. Aside from sheer numbers, it seems that drivers, though they have to pass many tests and qualifications, recently have been skipping the more difficult tests and experience of driving cargo and slower trains, for the easier tests and semi automatic driving of puyuma. That is a problem.
Today I saw on the news confirmation of my theory: yes, it was Taipei who decided that the train, in spite the multiple failures, delays and malfunctions, had to press on until Hualien, even though it was already limping since Ruifang.
This decision was made after the attempt at fixing teh mechanical problem in Yilan failed.
The TRA employee interviewed claims they did not have the resources to move the passengers to another means of transportation -charter buses- and it would take too long/further delays to bring the engine from Hualien, so they decided to keep on driving to Hualien, then switch there. All this is documented in a series of messages by phone.