Just like an idea (in PostgreSQL) how we changed one text value to another text value in all objects. Maybe you can find the way how to use this for replacing one Id to another
DO
$$
DECLARE
rw record;
BEGIN
FOR rw IN
SELECT 'UPDATE "'||C.table_name||'" SET "'||C.column_name||'" = REPLACE ("'||C.COLUMN_NAME||'",''OldTextHere'',''NewTextHere''); ' QRY
FROM (SELECT column_name,table_name
FROM information_schema.columns
WHERE table_schema='public'
AND (data_type ='text' OR data_type ='character varying')
AND table_name in (SELECT table_name
FROM information_schema.tables
WHERE table_schema='public'
AND table_type ='BASE TABLE'))c
LOOP
EXECUTE rw.QRY;
END LOOP;
END;
$$;
What if you just tried merging the two user contacts together? That would essentially reassign the owner value to the contact you retained. You might have some cleanup on the merged contact when done, but should work for all the reassignments