I agree, but I use a small improvement to the first approach: split each insert into two steps: "insert at end" and "reorder".
That way:
(a) the insert is nice and simple and
(b) you can reuse the code for re-order which you likely need anyway (and which solves the foreign key constraint issue, perhaps by doing it in a single SQL update).