[ ] store produce in chest, with at least 1 block of sand per ounce of food
[ ] fill an open chest or similar container with sand by right-clicking it with sandblocks, after a layer of sand, add fruit by rightclicking with the fruit-stack. Repeat until full and topped with sand
Root vegetables (e.g. carrots and potatos) can be stored in dirt/sand/gravel filled containers to further reduce their decay: https://www.gardeningknowhow.com/edible/vegetables/vgen/storing-root-crops-in-sand.htm
Possible implementations (non-exclusive?):