I’m not a huge fan of large gyms. We used to go to the YMCA by us with the kids when they were little. I felt like a sitting duck.
IF you’re going to take your firearm into the gym with you and leave it in a locker, I’d suggest getting one of the little gun safes (there’s a thread in the Community about them: Gun safe in your car? - #33 by Leonard)
I do not advocate leaving your firearm unattended in a crowded environment. Work out at home?