Retribution ought to be primary, in my opinion, as per Stephan Kinsella’s estoppel theory. Ultimately I think “equal suffering” is a more coherent standard for punishment than “restore the victim”. But that’s just my view; I don’t see it as a particularly important argument, because we can’t know in advance of there actually being a free market in law what free market courts will choose as a standard for determining punishments.
In this old thread, Kinsella argued in favor of retribution being primary, while Geoffrey Allan Plauche argued in favor of restitution being primary. In my opinion, Kinsella has the stronger argument. (The thread mixes together argumentation ethics and estoppel theory, which is unfortunate because they can and should be kept distinct… I accept estoppel theory but tentatively reject argumentation ethics).