Yeah, I don't like that kind of thing, too much whiff of communism for me, and 100% tax! Must be something inbetween.
But once a percentage affordable has been decided it should be stuck with unless it is one of those examples you gave of negative land value.
I don't know how you fix it but part of the problem is the legal strength of the developers. Councils sway to the developers side because the cost of losing an appeal in the courts is so big.
The fix, for a non interventionist, is the current situation. A contribution to infrastructure is expected by most developers (the odd hardcase won't give anything up), they don't really care what for (roads, schools, playgrounds, affordable housing) as long as it gets them their planning permission. A competent developer factors it in as a cost, just as they do architects fees etc. If the council asks for too much, a discussion is required. Who or what gives will depend on the skills / experience of the two sides and the instructions from management / politicians. If education has a strong hold, the contribution will go there first, if housing have a strong hold, the contribution will go there. The Community Infrastucture Levy, and its associated calculations of future infrastructure needs, was meant to deal with many of the 'oh, by the way, we need you to fund a new primary school' surprises.
One problem is land speculators who really do want to max out the value. Agree a 'purchase option' with the farmer (or a % success fee), gain planning permission, sell the option on to a proper developer. The landowners only sees the maximum £ promised by the speculator, the speculator wants the maximum fee/uplift, the ultimate developer either buys the land at that value or walks away - in which case you get zero houses with zero affordable rather than 100 houses with 10% reduced to 5% affordable contribution.
The issue is significantly more complicated than the simple 'the councils never give planning permision for anything' or 'the housebuilders sit on massive landbanks' portrayed in the media. There are councils, democratically elected remember, who do not want much new housing in their area. Equally there are developers who sit on sites waiting for the right conditions to get the best return on their investment.
Some examples:
A landowner sat on a site because it was his sons inheritance. When he died it would be sold and then be available for housing.
A landowner ran his business from a site and his elderly mother lived in the house in the middle. When she died he would relocate the business anyway, but not until.
A manufacturing company had a loan secured against some land. Accepting a lower value for that land would put that loan into default and become repayable.
Similar applies to land valued in company accounts as an asset, revaluing it at a lower amount (or selling it) comes straight off the balance sheet.
A manufacturing company wanted to have their land identified as a future housing site but wouldn't let it be named publicly because they didn't want their staff to know that far in advance that they had already decided to close the business down.
Then there are problems where sites have already been bought and the council comes along and imposes a new cost. Is it the developers fault for not having a crystal ball?
Similarly buying land for a fair amount when the market is strong, then trying to build it out when the market is weak. Accepting a lower contribution for affordable housing may ensure the site goes ahead now rather than being landbanked until the market recovers.
Yes the system can be, and is, gamed. By both sides.