I am a pool swimmer. Female. Nothing like this has ever happened to me in the pool, but it did once with the guy who hands out towels and locker keys, etc. I went to the office and complained and later that day got a call from the complex's attorney with an apology and his direct number if it happened again. It didn't.
I realize this is not your situation, but I have to believe that every sports complex, Y, JCC, neighborhood community association, has some kind of manager. Even after the fact, you should meet with that person and describe in detail what is happening.
In the mean time, for safe night swimming, swim in the lane directly in front of the guard stand. If someone is in the lane already, ask to split the lane or swim circles (not the best I agree, and you may need to explain why); and talk to the guard and ask for his or her help by keeping an eye out for you.
In the case of the guy telling you to get a room, pop into his lane and ask for his help.
Don't use the hot tub. At every pool I've ever used, even with dedicated lap swimmers using the pool, there are always people looking to make an earth connection in the hot tub.
I hate that the onus seems to be on you to modify your behavior. Please ask for help, from the guard, the manager, or the lawyer. Don't go this alone.
If it were me, and if none of these people were willing to get this creep banned from the facility, I would seriously think about changing my hours or changing my pool. I'm really sorry, you shouldn't have to do either, even if you can. But this is a dangerous situation and you trying to manage it by yourself could result in something even worse happening.
Please watch your back in the parking lot. Good luck.