Samsung Electronics and SK Hynix are upgrading their China factories to produce more advanced memory chips, four people familiar with the plans said, aiming to fend off competition from a fast-growing Chinese rival and meet huge AI demand.