The law doesn't prevent an employer from sacking any employee, at any time, with any length of service, with or without a valid reason. All it does is give some people who've been sacked the right to claim for 'unfair dismissal'. (Even if they're successful in their claim the employer doesn't have to take them back on again; they can simply pay compensation instead).
So nobody can guarantee that your employer won't sack you; we can only advise upon whether you'd have a reasonable claim for 'unfair dismissal' if it actually occurred. (That, of course, is something which an employer will also have in mind if he/she is considering dismissing an employee from their service).
The first thing to make clear is that the right to claim for 'unfair dismissal' only starts once you've been in the employment for two years. If you've worked for your employer for less than that time he/she can fire you without the need for any reason for doing so. (There are certain exceptions, relating to 'statutory discrimination', but they're not relevant here).
Once you've been in employment for two years an employer can only dismiss you (without facing a possible claim for 'unfair dismissal') over a single, isolated incident if that incident constitutes 'gross misconduct'. (Once again there are certain exceptions to that statement but, again, they're not relevant here).
It's now that we enter the grey area as to what does, or does not, constitute 'gross misconduct'. In some cases an employer will advise employees in advance of certain actions that will be regarded as 'gross misconduct'. (e.g. a delivery driver might be told that it will be deemed 'gross misconduct' if he/she leaves their van unlocked, with the keys in the ignition, while making a delivery). In general though the employer has to decide after an incident has occurred as to whether, or not, it counts as 'gross misconduct'. (If the employer decides that it is, and the employee goes to an Employment Tribunal claiming 'unfair dismissal', the Tribunal will then have to give their own ruling on the matter).
Clearly, if you'd sought to pay the cheques into your own bank account (or otherwise sought to profit from having them in your possession) your employer would have no problem in deciding that your actions constituted 'gross misconduct'. Similarly, if you'd failed to follow the correct procedure (with regard to keeping copies of the cheques) it might also be regarded as 'gross misconduct'. However it's less likely that a simple omission, as has occurred in your case, could be seen as 'gross misconduct'. (That assumes that putting the cheques into your bag, to bank later, was the approved procedure; it might not apply if, say, you were told to leave cheques on the premises if they couldn't be banked immediately).
While a decision about what is, or isn't, 'gross misconduct' ought to be based upon the facts alone, the reality is that other factors often come into play. So, if an employer has been itching to find a reason to get rid of an employee that they'd rather not keep on, they'll quickly classify certain behaviour as 'gross misconduct', whereas if they really value the contributions of a member of staff they'll decide that such behaviour doesn't fall under 'gross misconduct'.
So there can be no 'black and white' answer to your question. My own feeling though is that an Employment Tribunal wouldn't regard a single omission to act (i.e. to bank the cheques) as 'gross misconduct'. If your employer agrees they won't sack you (unless they're prepared to have the matter taken before a Tribunal). If they disagree, and do sack you, you might come out the winner in a claim for 'unfair dismissal'. (At one time you had to pay to take a claim for 'unfair dismissal' before a Tribunal but the Supreme Court has now ruled such fees to be unlawful).