The key to properly folding any mass of fabric is to minimize the number of "layers that are being folded (and the number of folds that are stacked directly on top of each other).
First, lay out the bag, flat & determine the width of the largest “piece of fabric” that it could contain (without folding or curling the fabric).
Next lay out the sail perfectly flat… preferably on grass. You need a helper here to do this right
Starting at the foot of the sail, one of you is stationed at the leech, the other at the luff.
Each of you will grasp the leech & luff simultaneously at a spot equidistant from the foot that is 3" less than the “width of the flat bag”
Holding the foot of the sail in place, pull the sail to create your first & second “layer”. (this is why you want grass…you are dragging the rest of the sail). Note that, until you “bag it”, neither the foot nor the “stack” will ever “move” (you’re moving the unfolded part of the sail only)
(If you’re folding a main or any sail with a boltrope in the foot, stop just shy of the boltrope so that your “second fold” is not on top of the boltrope).
Release the hand holding the foot and pin down the “second fold” while moving your other hand back up the leech/luff to repeat another section. This next section will be slightly shorter so that the first fold & third fold are not stacked on top of each other.
Repeat until you get to a batten. About every third layer, you can increase the size of your folds back to something less than the width of the first layer. If you can fold in such a way that NONE of the folds are directly on top of each other, you’ll end up with the least possible stack height.
If the battens are not parallel to the foot, some of your folds (at the “foot side”) will need to be angled so that the batten ends up parallel to each side of your “stack”.
When you get to the next batten, , make sure it’s not stacked “right on top” of the first one.
Continue until you’re done
It should fit nicely in the bag. You can thread a couple of sail ties under the stack and tie them loosely to help hold things together while you slide the bag down the stack (elevated by one of you). Don’t push the sail into the bag, slide the bag down the sail.
You should only bag a clean dry sail unless you’re going to immediately remove it and clean it elsewhere, in which case, clean the bag too. If you’re a “dinghy sailor” or you have a sail that you regularly fold, don’t fold it the same way every time to minimize weakening of the fabric where creases tend to form