Flintshire Council is among 23 local authorities being threatened with legal action by Thurrock Council