Is it possible to animate the wireframe slider in the viewport overlays using Python?
Not with keyframes or drivers
The overlay is a member of the 3d view space. bpy.types.SpaceView3D
Each property in blender has an is_animatable
property, declaring if it can be animated. Visually if you right click and there is no add driver or insert keyframes
Step thru this in the python console where C = bpy.context
Find which area is the 3d view
>>> for i, a in enumerate(C.screen.areas):
... i, a.type
...
(0, 'PROPERTIES')
(1, 'CONSOLE')
(2, 'VIEW_3D')
(3, 'TEXT_EDITOR')
>>> a = C.screen.areas[2]
Its 3d view space will be the active one
>>> s = a.spaces.active
And here is the overlay wireframe threshold
>>> s.overlay.wireframe_threshold
0.0
Let's see if the property def says it is animatable.
>>> p = s.overlay.bl_rna.properties['wireframe_threshold']
>>> p.is_animatable
False
Confirmed ... Nope.
There are some dodgy ways this could be achieved, but will wait for further details on animation required to elaborate.