The Frattini subgroup is the set of all nongenerators

An element $x$ of a group $G$ is called a nongenerator if for all proper subgroups $H \leq G$, $\langle x, H \rangle \leq G$ is also proper. Prove that $\Phi(G) \leq G$ is the set $\mathsf{ng}(G)$ of all nongenerators in $G$.

$(\subseteq)$ [Not finished.] Let $x \in \Phi(G)$. Now let $H < G$ be a proper subgroup. If $H$ is contained in some maximal subgroup $M$, then we have $\Phi(G)H \leq M < G$, so that $\langle x, H \rangle < G$ is proper as desired. Suppose now that $H$ is not contained in any maximal subgroup of $G$. Suppose further that $\Phi(G)H = G$. (@@@)

[Old proof, assumes $G$ is finite.]
Let $x \in \Phi(G)$. By a lemma we proved for a previous theorem, if $H \leq G$ is proper then $\Phi(G)H \leq G$ is proper. Now $\langle x \rangle \leq \Phi(G)H$ and $H \leq \Phi(G)H$, so that $\langle x,H \rangle \leq \Phi(G)H < G$ is proper. Thus $x \in \mathsf{ng}(G)$ is a nongenerator.

$(\supseteq)$ Let $x \in \mathsf{ng}(G)$ be a nongenerator of $G$. If $G$ has no maximal subgroups, then $\Phi(G) = G$, and we have $\mathsf{ng}(G) \subseteq \Phi(G)$. Suppose now that $M \leq G$ is maximal; in particular, $M \leq G$ is proper, so that $\langle x, M \rangle \leq G$ is proper. Thus $\langle x, M \rangle \leq M$, so that $x \in M$. Since $x$ is contained in every maximal subgroup, $x \in \Phi(G)$.

Hmm… It appears that the lemma assumes $G$ to be finite so that we can assume $H$ is contained in some maximal subgroup. So we could replace the hypothesis “$G$ is finite” by “every subgroup of $G$ is contained in a maximal subgroup.” This statement is not necessarily true for all groups, as there are groups which have no maximal subgroups at all.
I wonder if the following statement is true: “If $G$ has a maximal subgroup, then every subgroup is contained in a maximal subgroup.” If so, then perhaps we could consider separately the cases where $G$ has a maximal subgroup (which is covered by the amended lemma and this proof) and where $G$ does not have a maximal subgroup (in which case the Frattini subgroup, being the intersection over an empty class of subgroups of $G$, is all of $G$.) I don’t see how to prove this, or even if it should be true.