How does a pokestop become a gym?

I’m sorry if this the a wrong category, I’m not sure where to ask.

I know how many POIs is needed in a s14 cell for a gym to spawn, but I haven’t found a clear answer on how it is determined which one will become one.
Some people said it’s age based, others said it’s upvoted based (in ingress, but I haven’t find a way to upvote anything there). So, there’s an s14 cell with a gym, we almost have enough pokestops to finally have a second gym, but two of the oldest stops are kinda in an unpleaseant area, so we rather have one of new ones (when accepted) to turn into a gym. Is there a way to influence which pokestop become the second gym?

This was recently discussed in this topic, if you would like to read through it:

This is really old. Ingress used to be the database for Pokemon Go. They are no longer connected. They aren’t even part of the same company anymore. There can be issues on very old pokestops where the votes on Ingress photos were trapped when the database became separate, and that can explain some cases where the photo with the most likes in Pokemon Go is not the main photo.

The topic I pointed you to includes guidance stated on the old forum that trying to manipulate which becomes the gym is abuse. Aaron did not reiterate that statement on this topic, but AliceWonder did find another reference supporting manipulating gameplay as abuse.

Oh, and a Showcase pokestop will not become a gym.

Thank you! I’m still reading through that topic, there’s some interesting information there.

In summary - you can’t influence which pokestop will turn into a gym. It is selected strictly at random from the available gyms.

So for the first gym, each of two pokestops has a 50% chance; for the second gym, each of 5 pokestops has a 20% chance; for the third gym, each of sixteen has a 6% chance.

Since this is not about wayfarer, i shall close this topic.