Correct option is D
Option (d) is the correct meaning of the given idiom.
Flog a dead horse: To waste effort on something that has no chance of success.
Example: Trying to convince him now is like flogging a dead horse; he won’t change his mind.
Similar idioms: "Beating a dead horse," "Wasting time."