Yes barrel nuts are strong enough for this application. However, they're not your only option.
Would they be equal to, or greater than, nails/screws in terms of strength?
Like so many things it depends. To begin with the size of barrel nut you're comparing to is a variable, obviously the larger they are the stronger they are.
Nails are a good first point of comparison since screws are widely known to be stronger. But nail type and length matters (just as it does with screws) but with nails perhaps most important of all is how they're driven home. If you 'dovetail' or 'toenail' the nails in the strength of the connection is increased hugely compared to every nail being driven in at 90°.
For what you're looking to do some kind of screw-in / screw out connectors do seem the ideal choice though. And IMO no major connections in indoor furniture should be done with nails any longer, that's for rough carpentry and outdoor pieces only these days.
Since you're willing to do the drilling for the barrel nuts it's little extra effort to drill for the insertion of hardwood dowels instead, which can be used with conventional screws to provide essentially the same build, the same ability to be taken apart* and may actually prove stronger and more stable long-term:

Source: Fine Homebuilding. Note that where the drawing says to countersink that is actually a counterbore.
This method is also slightly more forgiving of minor issues with alignment, if that matters!
If you decide to go ahead with barrel nuts you might consider locking them with Threadlock or something to keep them from loosening due to vibration. But how prone to working loose the bolts will be is down to how closely they're machined as much as the amount of movement or vibration in the piece.
*Threaded connections in wood can usually be used multiple times without any loss of strength.