How to balance the advantage of playing first or second is hard to address in general.
It would largely come down to looking at the mechanics of your game, considering possible ways to benefit a player and doing play-testing to determine which player gets an advantage and how you could potentially get rid of that advantage. Also potentially consider what your game mechanics should look like in general when taking this into account. This may involve tweaking some mechanics to make them stronger or weaker, adding new mechanics or altogether scrapping or redesigning large parts of the game.
Simply playing first is usually a pretty big advantage (especially in a symmetric game), so the second player is often given an advantage, but of course this would depend on the game.
Let's consider the example where the second player can just repeatedly retake any area taken by the first player to win. A few ways to deal with this:
- Simply give the first player more starting moves to offset their disadvantage. Although this may instead allow the first player to simply follow this strategy to win, which isn't any better (except for the first player...).
- Make retaking an area worse or give a bigger benefit to taking an area not occupied by another player.
- Rethink how retaking works. Perhaps you need to have taken adjacent areas first, or it's something that only gets unlocked later in the game or you can do things to make it easier. If there are RPG elements, you could do this by allowing players to "research" weapons, build or upgrade a barracks or train soldiers.
- If all else fails, conclude that the fundamental concept you had in mind for the game just isn't viable because of this, no amount of small tweaking would make it fun and you need go back to the drawing board or even scrap the game altogether.
"Undoing" a move should not truly undo it
If you're able to do a move that completely undoes the move of the other player and resets the game state back to where it was before they moved, this, to me, points to a rather fundamental problem with the underlying design of the game. (It would be worse if your move makes as if theirs never happened but leaves you with some resources on the board, at least if you can do this from the beginning of the game)
Any move made (including undoing) should move the game forward in some way.
In practical terms, this means an "undo" is more of a strategic counter that allocates your resources in some way or to the same place in order to hinder your opponent's attempt to gain an advantage there.
Go is the best example I can think of right now. Every move involves placing a stone in turn, so each one progresses the game (well, there are ways to take stones too, but not from the beginning). The second player can choose to place a stone near the stone placed by the first place in order to defend or attack there, or they can place a stone further away to try to gain an advantage on another part of the board.
Chess is also an example. Many moves can be thought of as counters to other moves: from a move as simple as advancing a pawn to block another pawn to defending an piece being attacked. Moves typically move the game forward by opening up the board, moving pawns, which can only go in one direction, or removing pieces from the board and it's a strategic decision whether to try to counter something or to try to gain an advantage somewhere else.
On the subject of chess, it is possible to get back to the same board position repeatedly with some moves, which is why there's a rule stating if a position repeats 3 times it is (or can be) a draw. Go has a similar rule. This is, however, largely an artificial constraint: it's not really a fundamental part of the game and doesn't add anything beyond simply being there to prevent infinite repetition. I would recommend trying to change your mechanics in some other way instead to avoid repetition if possible.
Undoing a move might be expensive or rare
You could also have true undo's, but these are expensive or rare.
A few ways to accomplish this:
- It just costs 2 or more movement points (or whatever resource used for making moves) from your side to undo their move.
- To consider area domination as an example: they take some territory and you might need multiple units to take that territory from them (losing some of those units in the process).
- It costs some other type of resource to take an area from the other player.
- It takes some time to take the territory and in the mean time it's generating resources for the other player (meaning focusing on that too early instead of on gaining resources puts you at a disadvantage).
- A (recently) retaken area produces fewer resources than an area that wasn't occupied before.
- Give players a limited number of undo's (either from the start of the game or by finding some item during that game).
- Similar to the above, attach some cooldown to undoing, so it can only be performed a certain number of times over some time period.