"The spice must flow" has this historic antecedent. At times pepper's taste, preservative, alleged health value and price was off the scale, not unlike Dune spice.
As a Preservative: The value of pepper as a natural preservative for meat and other perishable foods has been known for centuries. Studies have shown that this is due to the anti-oxidant and anti-microbial properties present in pepper.
I couldn't come up with any examples of foods preserved using black pepper obviously, but that might just be cultural filtering (I'm from northern Europe).
Googling says "jams, pickles, preserves and candies" which was not very helpful.
https://www.menatti.com/en/prodotto/peppered-prosciutto-crud...
But usually most hams have the "cut" part covered in ground salt and black pepper anyway.