@markvs Regarding your update: No. You'd be shooting yourself in the foot.
I went with the path of least resistance, as I thought that was safest for me and would cause the least friction.
Understandable. He cornered you, literally and metaphorically....
But repeating the same behaviour with the same person is likely to get the same result.
I’m telling him I thought he was nice, but am not looking to date at the moment.
It's up to you of course, but I really,
really would not do that. You'd basically be telling him hitting on you was fine but circumstances. He'll probably keep trying to chat with you and eventually hit on you again since he knows you like him and a month has passed so how about next Saturday?
Additionally, what happens if you meet a guy you are actually interested in at the gym? Are you going to not date him? Date him but try to hide it from that particular trainer? Openly come and leave and flirt with your boyfriend and deal with the trainer possibly going all "Oh, yeah? Not looking to date, are you now?!" Now
that is really going to be awkward even if it's just looks or his body language.
And lastly, telling him you thought it was nice may come to bite you in the butt if the whole thing escalates.
I think, being honest and direct in a polite factual manner may be easier overall than trying to appease him with a sugarcoated lie.