Problems with multiple UNION in Blender
Join all the objects you want to unite using Ctrl+J
Create a new cube that contains all the joined objects inside
Use the Boolean Modifier on the Cube with Carve Solver and Intersect Operation