How can I animate the rotation quaternion of an object with just one driver?
A suggestion is to cooperate with Blender and simply use 3 drivers on the XYZ.  So far you do not have a strong case for fighting against this.   This does not appear to be a significant inconvenience and there are other issues you have yet to encounter.

If your were to state you have many objects such as 888 objects then another approach would be warranted.

You may also use Copy [Location,et cetera] Constraint to copy values from another object.

You can search [registering a function] but I would recommend against that until you state your level of experience with Blender and Python.