Is it possible to completely reset an iPhone so its software/firmware is guaranteed to be 100% factory fresh?
No, it’s not possible if the phone has received iOS updates, which it probably has. You may be able to reset it to the factory state of a new iPhone, but not to the factory state of your iPhone, because Apple works hard to ensure that you can’t downgrade iOS to the factory version.