How to deal with old data in frappe MariaDB database

As we know, the Stock Settings of an item in Erpnext allow the selection of the FIFO, LIFO, or Moving Average value technique. Let’s imagine I have the same medication (for example, paracetamol) in stock on various days and I wish to record these values individually because their price changes periodically. and, in order to reduce the amount of the first (old) paracetamol during stock out, I use the FIFO valuation approach (sale to customer). As a result, the quantity is now zero, and I will no longer be using this data. Therefore, according to database rules, what should be done to prevent this form of data redundancy