How to deselect origin center/ cursor blender with python?
I don't know a huge amount about scripting for Blender, but I have a small amount of development experience and this is what I found after some digging.
Overlay attributes are accessed through bpy.types.SpaceView3D
You can then access bpy.types.View3DOverlay
What you're looking for is:
show_object_origins
(Show object center dots)
show_object_origins_all
(Show the object origin center dot for all selected and unselected objects)
There is a similar question about how to access Viewport Overlay options, and it's recommended that you first iterate over the areas of the current screen and find the 3D View before attempting to set the overlay option you are looking to change.
There is appropriate code in the question I linked above.
I hope this helps!