Mending is a cantrip not yet implemented so could be interesting to mend the flail.
Does 5e include some kind of item degradation/condition system then?
I had just recently elsewhere seen the armor condition states that RagnarokCzD mentioned. I honestly don't remember if/how older D&D handled condition/repairing.