Does the setting "Try re-scheduling recording if more errors than (0=off):" in Configuration->Recording->Digital Video Recorder Profiles not meet your needs?
It's possible to run a script when a recording finishes, see Configuration->Recording->Digital Video Recorder Profiles. You can pass down to the script the number of errors in the recording - see the help for details.
Your script must now delete the recording if the number of errors exceeds your threshold. This can be done using the HTTP API, see
https://github.com/dave-p/TVH-API-docs/wiki/Dvr#dvrentryremove. Unfortunately that API requires the UUID of the recording; to find that you will need to find the DVR log file corresponding to the recording in ~/.hts/tvheadend/dvr/log/ - the UUID is the name of the log file.