Offsetting penalties in the NFL: One-for-one basis?

Suppose that in an NFL game, there are four rule violations occurring all within a single play. The offense commits one violation and the defense commits three.
Now, under the principle of “offsetting penalties,” would the slate be wiped clean, “Start the play all over again,” or would the penalties offset on a 1-for-1 basis: That is, one defensive penalty offsets the 1 offensive penalty, but the defense still has 2 unaccounted-for penalties that need to be enforced against them?
Basically, would it be “If both sides committed penalties, then the play is re-played, even if one side committed 1 foul and the other side committed 10 fouls”?

I believe that the number of fouls doesn’t matter, 1 foul can offset 10 fouls, the slate gets “wiped clean.” Makes sense since when there’s multiple fouls on only one team, say a 10-yard holding penalty and 15-yard roughing the passer, they only get to pick one foul, not add both together for 25 penalty yards.

I do believe there’s an exception though that if one team has a 5 yard penalty and the other team has a 15 yard penalty, the 5 yarder gets ignored and the 15 yarder is assessed.

This is accurate. There aren’t many 5-yard penalties (though they happen fairly often), and, with the exception of defensive holding, they’re all of the procedural variety (false start, offsides, delay of game). Whereas, 15-yarders are unsportsmanlike conduct / personal fouls.

So, I’m sure the thinking is, “offsides isn’t nearly as big a deal as trying to take someone’s head off.”