>>1657181On this AB system map you can see the three rack lines: The Rorschach-Heiden line, the Rheineck-Walzenhausen line (both isolated from the rest of the AB network but connected to other rail lines), and the Altstätten-Gais line.
The Heiden line sees some commuter and tourist usage, so it'll be kept despite low profitability.
The Walzenhausen line is a mixed bag, because it needs new rolling stock soon but being a tiny little line with few passengers that's a big expense. However it's very dear to the town of Walzenhausen, and it's also a small tourist attraction, often coupled with taking the Heiden line, hiking to Walzenhausen, and then taking the Walzenhausen line back down.
The Altstätten-Gais line has the problem that it ends on the opposite side of Altstätten from where the mainline railway station is, and apparently the kino option of having it cross the town as a street running tram isn't being considered, and instead it would get switched to bus service when the rolling stock reaches the end of its useful life in 10-15 years.
Rack lines in eastern Switzerland have it tough.