How to animate deforming scratches?
In the first example why not use a rectangle instead of a square for the boolean so the backside is longer and doesn't disappear as it goes over the bottom cube. You could animate lots of strange shapes for options.
You may also want to do something like in the unrelated answer to this question here:
Animating appearing/extending strip with gaps