This paper studies the secrecy performance of a wireless network (primary network) overlaid with an ambient RF energy harvesting Internet of Things (IoT) network (secondary network). The nodes in the secondary network are assumed to be solely powered by ambient RF energy harvested from the transmissions of the primary network. We assume that the secondary nodes can eavesdrop on the primary transmissions due to which the primary network uses secrecy guard zones. The primary transmitter goes silent if any secondary receiver is detected within its guard zone. Using tools from stochastic geometry, we derive the probability of successful connection of the primary network as well as the probability of secure communication. Two conditions must be jointly satisfied in order to ensure successful connection: 1) the signal-to-interference-plus-noise ratio (SINR) at the primary receiver is above a predefined threshold, and 2) the primary transmitter is not silent. In order to ensure secure communication, the SINR value at each of the secondary nodes should be less than a predefined threshold. Clearly, when more secondary nodes are deployed, more primary transmitters will remain silent for a given guard zone radius, which will in turn impact the amount of energy harvested by the secondary network. Our results concretely show the existence of an optimal deployment density for the secondary network that maximizes the density of nodes that are able to harvest sufficient amount of energy. Furthermore, we show the dependence of this optimal deployment density on the guard zone radius of the primary network. In addition, we show that the optimal guard zone radius selected by the primary network is a function of the deployment density of the secondary network. This interesting coupling between the performance of the two networks is studied using tools from game theory. We propose an algorithm that can assist the two networks to converge to Nash equilibrium. The convergence of this algorithm is verified using simulations. Overall, this paper is one of the few concrete works that symbiotically merge tools from stochastic geometry and game theory.