Why cannot I override the context for bpy.ops.object.origin_set()
from the blender bug tracker https://developer.blender.org/T57572


  operator origin_set relies on selected_editable_objects afaict, so adding override["selected_editable_objects"] = [bpy.data.objects["Cube"]] should do the trick: