If the wire nutted splice is attached to a breaker, then it is OK. However, if the wire nutted connections are part of a pass-through, i.e., using the service panel as a junction box, then it is a big NO-NO.
Everybody makes mistakes. :0) I came up shoty on a 22v line inside a garage one time. Had to put in a j-box. I prefer continuous wire for 220v but it is perfectly OK to use a j-box.
In your case, this pigtail is allowed and it should be no problem. As a personal practice, I tape the connection after applying the wire nut. Just guarantees no slippage.
Happens a lot with service changes (even though I know this wasn't the case here). The wire is not long enough for the new panel, so your choices are to have j-boxes all around the new panel or make your splices in the new panel. You are fine.