I found the issue: the .dream3d files with the "StatsGenerator" filter I used previously specified a primary and secondary phase, but the .json pipeline did not account for this. I changed the .dream3d file by removing the secondary phase from the StatsGenerator filter and now the .json pipeline works every time.
The default settings in the Python script will create the following microstructure, show here with unique grains. There are 4, 10, and 7 grains in the X, Y, and Z directions, respectively. As a note, this microstructure is non-periodic.
The same microstructure with elements displayed is shown below. There are 6 elements per side for each grain, which results in 6^3 = 216 elements per grain.