I would prefer to keep each axis angle as variables and calculate the rotation matrix each time as below:
let rotationQuaternionX = simd_quatf(angle: angleX, axis: SIMD3(1, 0, 0))
let rotationQuaternionY = simd_quatf(angle: angleY, axis: SIMD3(0, 1, 0))
let rotationQuaternionZ = simd_quatf(angle: angleZ, axis: SIMD3(0, 0, 1))
box.transform.rotation = rotationQuaternionX * rotationQuaternionY * rotationQuaternionZ