how to add a driver to the z rotation local axis of an object?
Select your empty.
Open the properties panel in the 3D view N
Hover over the Z axis of the location field, RMB  > Add Single Driver.

Open the Graph Editor and switch it to Drivers.
Select the driver on the left panel, then press N to open the properties and start editing the driver.