Zebra is a tool, not a god. You decide the exposure, the zebra doesn't
. When/if it's working properly, it will tell you where in the scene it's darker or lighter than whatever the resulting digital image can represent using the current exposure settings. If there are zebra stripes over an area where you want details to be stored in the photo, zebra has given you the clue that you will need to alter the exposure.
If you are shooting something that can't be managed by autoexposure and auto white balance (like your all black or white walls with no detail), you really shouldn't use those automatic modes. You should either use manual modes or the paint bucket in photoshop instead.
Also, the zebra in chdk doesn't count photons, it just reads what's on the camera's LCD and trusts that (while half-shuttering) the camera is guessing how the exposure will turn out well enough.