I am pretty much following the procedure of this answer but I can't get my head around as to where to set the 'Units' from 'Map Units' (default) to Millimeters
that is.
So far, I tried several variants to define a unit type and set the symbol layer to it:
millimeters = QgsUnitTypes.DistanceUnit.Millimeters
renderer().symbol().symbolLayer(1).setUnits(millimeters)