When my dog was young, she used to ravage my Christmas tree layout until one day I was working on something and had a TMCC engine on the track with the power turned on. She must have been sniffing the track and shorted her nose out across the rails because I heard a little yelp and she never bothered it again. I doubt it was so much a painful yelp as a surprised one, so you should be ok with a cat.