As far as I know, investments in particular in local and regional trains is heavily driven by cantonal investments. For example ZVV (Zürcher Verkehrsverbund) contracts the S-Bahn network from SBB and finances a good part of its operations. While Zurich's network is therefore quite excelent, I am not sure other cantons invest at similar levels and therefore enjoy a worse experience.
I also use the train daily to get to Romandie (to Lausanne), and I almost never have problems: maybe the train is late every two weeks by 5 minutes.
Does that mean Ticino is a third-class citizen?
What doesn't seem to work well are interconnections with neighboring Italy, but that is likely not due to underinvestment on the Swiss side. Road traffic is therefore still a huge issue in Ticino, as many Italian workers cross the border twice per day by car due to the lack of adequate public transport options.
I know things are better in Swiss German parts but my experience has been so I have considered maybe getting a car or anything to avoid the trains.