This should be thoroughly tested.
I'm not sure yet if this works correct with ALUGrid. Does ALU support gmsh files? For ALU the intersection.boundarySegmentIndex() doesn't seem to get the right parameter. For element params it works.
How parameters can be attached to a grid seems to be a mess and different for ALU and UG.
@bernd is it possible that gmsh params in parallel need manual load balancing as done for the dgf gridPtr params?
Find a measure of success for the parallel tests: as partitioning is not preserved across machines, simple parallel vtu comparison won't work.