It is very difficult and many banks will require the customer to deposit all of their sales and withdraw the cash to replenish the machine - often from an account to be used solely for the ATM activity if the dispensed cash and cash withdrawals don't add up it is very easy to see this way.
My former institution did not do this, so what I had to do was to calculate the money given out by the machine (total of the ACH deposits from the ATM processing company over a specific time period) and add that amount to the customer's cash deposits to determine if the amount was reasonable. If the total that they are putting in the machine combined with the cash deposits is too high for that business, I would question what the source of cash was.
_________________________
Knowledge is knowing what to say. Wisdom is knowing when to say it.