Your process is faulty. You cannot just return a check after your midnight deadline. The depositary bank gets such a check back, sees that there isn't enough money in the account into which the check was deposited, and takes a look at dates. They see that you made a late return (after your midnight deadline). They refuse the late return, sending it back to you via the Fed check adjustments process, and they are right in doing so.
If you have paid a check that your customer claims was altered, you start by comparing the allegedly altered check with legitimate checks on your customer's account to ensure it's an alteration and not a counterfeit. Look at the check paper, printed layout of the two checks, etc. Only if you are sure that the checks appear the same can you claim alteration. Next, you make copies of the check and an affidavit from your customer that the check was altered, and send them with a cover letter to the depositary bank, informing the depositary bank that you are making a claim against them for breach of presentment warranties under UCC section 4-208 due to alteration of the check. Your claim is for the amount of the check. You request that the depositary bank remit the funds by cashier's check payable to your bank.
If, when you are comparing the check against other checks paid on your customer's account, you see that the check in question has a different layout, check paper color, misspellings, or other differences, you are looking at a counterfeit, not an alteration. And if it is past your midnight deadline, your bank is usually responsible to its customer for paying the counterfeit item. The depositary bank is not responsible.
And of course, go back to Randy's comment above. For smaller amounts, it may not be worth the effort or expense involved.
_________________________