Avocados and all sorts of other pricey things look really yellow and oblong when there's no manned registers open. I've never been confronted about the 4-6 bananas I buy when I used the self check. I really wonder if they can even prosecute you. You just did a bad job, guess they should fire you from your unpaid employment.
I'm not aware of any court precedent about self checkouts. I'd imagine no court would let you off on something like that. I could see missing scanning an item, but willfully miss registering produce so you get a cheaper price, especially if they catch you doing it on multiple occasions is not going to be allowed.
Mushroom bags are your best friend, can't see inside and unless you got a weirdo worker who cares way too much in the self service, no one's gonna check if you have mushrooms or whatnot, those cameras on the checkout are just to scare people into thinking they're being watched.
They get watched after the fact if they suspect something, if you're just acting normal and doing your shopping, no one's gonna know, fresh Produce counts are always off, so they'll just think someone's messed up counting and fix it..