Does a factory reset also format device, or just delete and remove indexes?
Actually it is both more complicated as well as simpler!
When you choose to erase all contents from the device, the only thing overwritten and deleted is the encryption key for the device. Without the key, the contents of the disk drive is no longer accessible to anyone, and is thus treated as being equivalent with it being deleted.
In your example, neither 120 GB nor 20 GB of data is written to the disk. It is only a very small amount (less than 1 MB) that is written. Namely the encryption key(s) are overwritten, and the drive is formatted a new (which only writes certain data structures to the drive - it does not as such overwrite the old data contents of the drive, neither used or non-used).