I heard a story years ago about a redistribution in Ireland.
The ruling party created 3-member districts in areas where they had the majority, so they could win 2 seats out of every 3. In areas where their opponents had the majority, they created 4-member districts, so each party would come out with 2 seats.
That was standard Fianna Fail practice -- called a "tullymander" -- until they pushed it too far, and had to set up an independent Constituency Commission like our boundaries commissions.
The Tullymander - defined as a gerrymander that backfires - was actually a Fine Gael/Labour effort (Tully was the Labour Minister for Local Government whose responsibility the redrawing of electoral boundaries was). They drew up a set of 13 3-seat constituencies in Dublin city and county, in the expectation that most would elect 1 FF, 1 FG, 1 Lab, with the one exception being a 4-seater which could be expected to return 1 FF, 2 FG, 1 Lab.
In the event, the swing to FF (the result of a combination of a giveaway manifesto and the deep unpopularity of the then coalition government) was so large that most of the 3-seaters elected 2 FF.
One of the positive achievements of the incoming FF government was to hand over the redrawing of boundaries to an independent electoral commission, where it has remained.
Governments can still try to influence the outcome in general terms by modifying the terms of reference, however; so, for next year's local elections, seats have been taken away from more rural counties in the west and allocated to local authorities in Dublin and surrounding counties, and the minimum number of councillors to be elected by any ward will be 6 (resulting in some local election wards with populations of 50-60,000). This may, purely coincidentally, help to alleviate the slaughter of Labour councillors next summer.