It’s definitely safe, but it isn’t somewhere that I would recommend you wear it.
The gym is an area where I prefer to go to just work out - rather than picking up girls. Women will likely feel the same way about it that they are only going there to work out.
Here’s something you can read up on. many people have opinions about wearing pheros, you can do a search to find a more conclusive (or not) answer about what to do in this situation.