An assembly is provided for a turbine engine. This turbine engine assembly includes a rotating assembly and a sensor. The rotating assembly is configured to rotate about an axis. The rotating assembly includes an engine shaft and a stack nut threaded onto the engine shaft. The stack nut includes a castellated periphery. The sensor is configured to measure fluctuations in a magnetic field induced by the castellated periphery during rotation of the rotating assembly about the axis.