Another option would be to use a specific kernel for thresholding in order to produce 1-bit images and not 8-bit images.
Is coordination with 1-bit labelling and binary morphological operations, could significantly reduce memory accesses related to this very usual combination of algorithms.