What 'virtual tape' image format is most suited for data preservation i.e. can store metadata like density and media type of original tape, presence of data past EOT marker, parity/ECC bits etc.?
The 'virtual tape' (let's say .TAP files) format will strongly depend on the actual tapes you're trying to back-up.
For example, Commodore (64) only cares about tape signal crossing zero, so a tape "emulator" simply emits those signals at given intervals. Markers (EOT, ECC) and others are also encoded as the same signals. This format simply determines binary 0 or 1 using "spacing" between those zero points.
More advanced system may use edge detection (ideally for a square wave), where it might recognize rising and falling edge for a 0 or 1.
If you're trying to backup tapes from another platform it may entirely have different format (such as wave type, often sine or square, amplitude coding, signal modulation, multiple tracks etc).