fearing it may stop functioning in the future
It most certainly will.
If it has a removable battery, remove that ASAP, and it’ll probably last a lot longer. If your phone isn’t a total piece of shit then you can probably run it without the battery strictly from the charger’s power. If you have a UPS, plug the phone’s charger into that when accessing the phone. If the phone is a piece of shit and requires the battery to boot (some actually do, you’ll have to check) you should consider buying a replacement battery or figuring out a way to wire DC power to the connectors if you have the skills for that. With a dud/worn out battery an otherwise perfectly okay phone may be stuck in a cycle of charging, booting, and depleting the battery during the boot process, and shutting off preventing you from accessing the device until you replace the battery or wire appropriate DC power to the battery connectors.
Is there a way to effectively preserve this phone, including all its data, in a virtual environment?
In short, no.
Android is designed in a way that “knows better” than you. You do not “need” to have low level access to the phone data, so Google/PhoneManufacturer has locked you out “for your own protection and security”. With computers, it’s pretty easy to clone a boot drive and boot it into a VM for archival purposes and the ability to migrate to different hardware in the future but phones actually go to great lengths to prevent this and that will be your biggest obstacle here.
If your phone was rooted and had the bootloader unlocked and a custom ROM installed you could potentially have an easy way to clone it all but that’s usually never the case.
I’m looking for a method to create a virtual replica of the phone that retains all its contents.
This should really be quite simple but the manufacturers hate you. So, it isn’t. This is sad, but this is just how it is. Preventing easy “stealth” cloning (cloning without unlocking store now/decrypt later style) is good but these devices should allow authorized cloning (boot, decrypt/unlock, then clone) to the owner but unfortunately they do not.
Keep the phone for as long as you can, but plan for it to die some day. If you cannot find a tool to back something up, set up a DSLR/mirrorless camera or suitable smartphone into a copy stand and record a video of the screen as you access whatever data may be in apps without a good way to export their data. It’s a brute force method that will produce difficult to browse data, but it’s foolproof. Screen recorders won’t even work on Androids in all cases because certain apps block them from functioning. They claim this is for “your protection”, but really it’s at your inconvenience.
Sometimes the best method isn’t a transfer at all. Don’t forget transporting is an option.
Do you need to transfer the files? or could you just use an external you share between different PCs?
If an external works, but seems inconvenient, you can fix that by having the drive connected to a USB switch. When connected to a switch you can press a button or use a remote to change which PC the drive is connected to giving you instant access to the drive contents without having to sync/copy anything over.
Links below for examples of USB switches
https://www.amazon.com/Cable-Matters-Sharing-Computers-Peripherals/dp/B083JKDNRJ/
https://www.amazon.com/Sabrent-Computers-Peripherals-Indicators-USB-SW30/dp/B074TYDJK2/