There is nothing grammatically wrong with how you've written it, but it is a garden path paragraph. The first sentence implies that that speaker is speaking to someone who is losing, the second sentence implies that the speaker is speaking to someone who is winning.
The first change I'd make would be to make it clear that the first sentence is a restating of a proverb, i.e. a quote. I'd do this by putting quote marks around it.
"If you can't beat them, join them." Once your opponents realize they have no chance of defeating you, they'll join you.
The second thing that's needed is some context. In the middle of a conversation where it's clear that a) the person is winning and b) the person wants the opposition to join them, then my text above makes perfect sense:
Abigail: I wish XYZ Corporation would stop competing with us, and instead accept my generous offer to buy them out and merge our businesses!
Stuart: "If you can't beat them, join them." Once your opponents realize they have no chance of defeating you, they'll join you.
On the other hand, if you are intending this to be a stand-alone phrase, a new version of the proverb maybe, then you need to add the context in within the phrase:
"If you can't beat them, join them." Once your opponents realize this, and realize they have no chance of defeating you, they'll join you.
or
"If you can't beat them, join them." Everyone knows that. So once your opponents realize they have no chance of defeating you, they'll join you.