The cog train at the Zugespitze at Garmisch is what immediately came to mind. Have ridden it a number of times but the most thrilling is the Sielbahn.
https://www.youtube.com/watch?v=gkHoVe19q0w
http://zugspitze.de/de/service/bautagebuch
I rode up this one back in 1990.
https://www.pilatus.ch/en/discover/cogwheel-railway/
This used to be the steepest.
As part of a First Class Europass(train) we took a boat from the dock in Lucerne to the other end of lake Lucerne. You then got on the cog railway to go the top of Mt Pilatus. From the top of the mountain you took a tram car down the other side and then a bus took you back into town. It was a great round trip day trip package.