Beat it eventually!
My strategy evolved from random inputs abusing respawning, to only collecting 1 light at a time and revealing as much path as possible, to actually using the disperse feature and getting as many boxes into holes as possible before compressing them
It was a surprisingly compelling journey actually
Not sure what the dark cubes are useful for however