The only things that got scanned into the digital realm in ‘95/‘96 were the shots getting cgi added to them. The optical composites were also redone digitally using scans of, presumably, the original VistaVision vfx footage.
Literally everything else had to be restored photochemically.
Lowry’s 2004 HD master that was initially prepared for the dvd was created from a 2k scan of the camera negative. This was redone from scratch in 2012 for the 4k.
The new pieces of negative created in ‘96 for the SE would’ve mostly been filmouts of footage that had gone through the computer to have new cg effects added to them (obvious exceptions here and there, the new shots of Boba Fett and Oola in RotJ for example) and/or been generated entirely in cg. It’s unclear whether these new and redone vfx shots still existed in purely digital form by 2004/2012 or if only the filmed out negative was made.
TPM’s digital filmout tapes, which were used to film out the final “negative” in May of ‘99, were still readable twelve years later when it came time to prepare the blu-ray and do the 3D conversion. Remember, unlike the SE which was still mostly the true original camera negative, every single shot in TPM had to go through the computer to have vfx added to it, something pretty much unprecedented for a live action film at the time. Even the few shots that had no vfx added to them were scanned in/out just for the sake of consistency.
So, for the SE it was just the new cgi vfx shots (either the old footage with cgi added to it or the entirely new cg shots) and the digitally recomp’d shots that would have existed in their finished form as digital filmout tapes before being, well, filmed out to brand new pieces of negative. Whether those filmout tapes were saved and still readable by 2004/2012 is unclear, but I’ll just say that back in ‘04 watching the dvd even the entirely cg shots in A New Hope still look like they were scanned back in off the filmed-out negative.