PERF: optimise backfilling of topic_id (PR #13545)

Relying on large offsets can have uneven performance on huge table, new implementation recovers more cleanly and avoids double updates

GitHub