Claudia Roden’s classic, The New Book of Middle Eastern Food, has an outstanding Lebanese stuffed eggplant pickle recipe called,
Betingan Makdous that I really like. The basic idea is to poach 3-4 inch eggplants in salted water then press out the bitter juices with a heavy lid or other weight. After flattening, cut a pocket in the pressed eggplant then stuff with a mix of walnuts, chili and garlic. Put these stuffed little eggplants in a jar then cover in olive oil to preserve. The cookbook is tremendous and worth buying for all the amazing veg recipes.
I couldn’t find Roden's recipe on line but this one by author "Samira" has nice instructions and seems very similar with 2 differences that may impact shelf-life:
Samira, uses more chili per cup of walnuts and she salts the eggplants after poaching (mored salt could allow longer shelf life in Samira's recipe):
https://www.alphafoodie.com/simple-stuffed-makdous-recipe-cured-eggplant/
Roden says that these little eggplants keep on month in the refrigerator. Samira, says that hers keep for a year.
Such a unusual (for me) and delicious appetizer!