I found a quite nice solution and posted it below as an answer. The result will look like this:
Add the week to 52 times the year, so that weeks are ordered "by year". Set the tick labels back, which might be nontrivial, to what you want.
What you want is for the weeks to increase like so
nth week → (n+1)th week → (n+2)th week → etc.
but when you have a new year it instead falls by 51 (52 → 1
).
To offset this, note that the year increases by one. So add the year's increase multiplied by 52 and the total change will be -51 + 52 = 1
as wanted.