I believe this method falls strictly under deterrence.
It is not possible to extract more punishment on an individual than their death, technically, unless you believe in an afterlife.
It is not punitive and meant to 'correct' the builder; it is meant to 'prevent' the builder from cutting corners.