I had a pool at my last house. We had a tall wooden privacy fence but my partner was worried about neighbors. I had a friend in the DA’s office so I asked him if we could get into any trouble from a complaining neighbor. He said no. In your backyard there is what they legally call an “expectation of privacy”. So if you put a hidden camera in the bathroom of your home you can be charged because when people enter a bathroom, even one in your private home, there is this same expectation of privacy. If someone is peering over a privacy fence they would be at fault. I will add that there were no two story homes near us but I suppose that could complicate this situation.
We always swam nude, except with family members. All of our friends knew that trunks weren’t used and no one had an issue. Some guys would bring them for the cookout - I was usually just wearing shorts and wore them at first but they typically came off later. These were not sexual parties at all. Just friends hanging out.
I bought tan through swim trunks for a trip to Hawaii but honestly they were so thin I had to order the tan through bikini swim suit to wear as an undergarment. The bikini had an extra layer of fabric that covered the penis so when we got to the beach I was comfortable enough to wear just the bikini by itself.
All this to say do what makes you happy and comfortable. Wearing a jock seems odd to me. I would say a thong or bikini style suit would be the way to go. You can choose to show more in some situations and less with other guests.