Say, measurements are 10 times per second as RecordIndex, one record is, say, fixed RecordBuffer = 512 bytes like "parameter1=value2,parameter2=value2,parameter3=value3.....", for sure within the buffer.
We have to know the free available memory TotalFree, possible records qty MaxRecordsQty = TotalFree / RecordBuffer.
If RecordIndex +1 > MaxRecordsQty then "delete the oldest and save the latest"...
Do you think the Global store can help here ? For maybe thousands of records... MaxRecordsQty is variable at any MCU reboot ?