South Korea’s largest company has been struggling with a historic slump in the price of memory, as consumers cut back on purchases of gadgets amid soaring interest rates and inflation. Inventory has piled up, forcing double-digit price slides that are deepening losses.