If you say that someone is flogging a dead horse , you mean that they are trying to achieve something impossible .
to get off your high horse
if you tell someone to, or suggest that someone should, get off their high horse, you are suggesting they stop behaving in a superior manner
to get on your high horse
to adopt a superior or pretentious attitude
to put the cart before the horse
If you say that someone is putting the cart before the horse , you mean that they are doing things in the wrong order.
to close the stable door after the horse has bolted
If you say that someone has closed or shut the stable door after the horse has bolted , you mean that they have tried to prevent something happening but they have done so too late to prevent damage being done.
you can lead a horse to water but you can't make it drink
said to mean that you can give someone the opportunity to do something, but you cannot force them to do it if they do not want to