Algernon. Nothing will induce me to part with Bunbury, and if you ever get married, which seems to me extremely problematic, you will be very glad to know Bunbury. A man who marries without knowing Bunbury has a very tedious time of it.
Jack. That is nonsense. If I marry a charming girl like Gwendolen, and she is the only girl I ever saw in my life that I would marry, I certainly won’t want to know Bunbury.
Algernon. Then your wife will. You don’t seem to realise, that in married life three is company and two is none.
Jack. [Sententiously.] That, my dear young friend, is the theory that the corrupt French Drama has been propounding for the last fifty years.
Algernon. Yes; and that the happy English home has proved in half the time.
While Wilde was undeniably a homosexual man who openly cultivated homosexual relationships with male friends and male proteges, and while Wilde did use his art of language, wit and humor to ridicule society, it was not always with the intent of advocating his homosexual value system; he was far too intelligent and gifted to limit his perceptions and commentary in this way. Thus while these things are true of Wilde, this is no support for automatic biographical and gender analyses of his texts.
In Earnest, Wilde presents what he is ridiculing in the opening lines. He is ridiculing the unscientific, unobjective attachment to sentiment and sentimentality as practiced in the Romantic world of England's high society (Romantic as in the literary and cultural movement first begun by Goethe through The Sorrows of Young Werthe and Faust Part I, Urfaust). Wilde reveals this in Algernon's response to Lane's "polite" refusal to listen to unavoidable and inescapable piano playing [font changes added for emphasis]:
Algernon. I’m sorry for that, for your sake. I don’t play accurately—any one can play accurately—but I play with wonderful expression. As far as the piano is concerned, sentiment is my forte. I keep science for Life.
Still, as the above quote says, Wilde does present Bunburying as a metaphor for men escaping marriage. It would be a stronger interpretation if Algernon were married. He is not (nor is John Worthing), nor has he any intention of being married (until he meets Cecily). This suggests that Bunburying's deeper metaphor is for men feeling the need to escape the company of silly women (and all the women in Earnest are lamentably silly, as silly as all the men), a position for which there is textual proof when Algernon summons the needs of Bunbury in order to escape dinning again with his Aunt:
Algernon. ... I have just had a telegram to say that my poor friend Bunbury is very ill again. [Exchanges glances with Jack.] They seem to think I should be with him.
Yet with this assertion about silly women you run the risk of implying that Wilde was making a gendered comment against women and this is not supported in the text: he is making a comment against silly, sentimental, unscientific people with two men being the first and the foremost ones he accuses and ridicules (three if you include silly Lane: "I didn’t think it polite to listen, sir.").
Your second assertion is much more difficult to find analytical textual support for, though individual interpretation doesn't always hang upon textual support. I'd suggest that the key to the characterizations of Algernon and John are found in Wilde's objective: to ridicule unscientific, unobjective attachment to sentiment and sentimentality. This suggestion is supported by one of the early remarks Algernon makes to John/Earnest. Algernon is trying to find out who "little Cecily" is and whose cigarette case it really is that is inscribed as from Cecily. Here, Algernon gives away the extent and depth of his and John's friendship:
Algernon. ... your name isn’t Jack at all; it is Ernest.
Jack. It isn’t Ernest; it’s Jack.
Algernon. You have always told me it was Ernest. I have introduced you to every one as Ernest. You answer to the name of Ernest. You look as if your name was Ernest.
This suggests that their friendship is neither an extensive nor a close one. Surely Algernon would have known more about John had their friendship had more depth and closeness. In fact, it appears that John cultivates Algernon's friendship mainly for the sake of being around Algernon's cousin and John's beloved, Gwendolen. In summary, while your first suggestion is supported textually, your second has no solid textual support, in fact, the text goes contrary to the interpretation.