Here are two websites devoted to the math of gerrymandering. Papers linked from these sites include the Markov Chains and Geometry approaches to the problem.
Metric geometry and gerrymandering group.
Quantifying gerrymandering.
Here is a list of papers using game theory and social choice theory instead of
Markov chains, to assess election processes.
The first one is a book, and the rest are articles.
Title: Evaluation and Optimization of Electoral Systems.
Authors: Pietro Grilli di Cortona , Cecilia Manzi , Aline Pennisi , Federica Ricca and Bruno Simeone
Website: https://epubs.siam.org/doi/book/10.1137/1.9780898719819
Stackelberg voting games by Conitzer and Xia
Equilibria of plurality voting with abstentions by Desmedt and Elkind
Complexity of and Algorithms for Borda manipulation by Davies et al.
Convergence to Equilibria in Plurality Voting by Meir et al.
Cloning in Elections: Finding the Possible Winners by Elkind et al.
Computer-aided Proofs of Arrow's and Other Impossibility Theorems by Tang and Lin
Coalitional Voting Manipulation: A Game-Theoretic Perspective by Bachrach et al.
Truth, Justice, and Cake-Cutting by Chen et al.