Heat oil until shimmering. Saute onions and garlic until soft and translucent but not brown, 3-5 minutes. Add spinach, salt and pepper, cover tightly and cook until spinach wilts completely, stirring once or twice, 3-5 minutes total.
Scrape the mixture into a sieve and let cool to room temperature. Squeeze out excess moisture, then chop until fairly small but not pasty.
Stir in feta, parsley, mint, nutmeg and lemon juice. Taste and adjust salt and pepper if needed. Beat egg lightly, then stir into spinach and cheese.
Unwrap and unroll phyllo. Cover with a damp towel at any time it is not being used. Lay out one sheet of phyllo and brush with melted butter.
Place a scant 1/4 cup of filling in the center of the far edge of the pastry sheet. Fold one side over the filling lengthwise, brush with butter, then fold the other side over and brush with butter. You will have a long, narrow rectangle, 1/3 as wide as the original pastry sheet, with filling at the far end. Fold the filling end over, forming a triangle. Continue folding, maintaining the triangle shape (like folding a flag), brushing each dry surface with butter when it becomes exposed. When the last fold is made, place the packet on a baking sheet in the freezer. Repeat until all the pastry and filling are used up.
When the packets are frozen solid, wrap tightly in foil, then store in an airtight bag until ready to use. Well-wrapped, they should last several months.
When ready to bake, preheat oven to 350°F Place the triangles on a foli-lined baking sheet, brush with melted butter and bake 30 minutes or until deep golden-brown. (If you choose not to freeze them first, they will not take as long to bake, so start checking after 15 minutes.).