When I consulted, I spun up a new virtual machine, installed any and all of their software and that's where I did all of their work.
Advantages? Some companies have pretty invasive software, this isolated that concern. The VM was a blank slate. Nothing from my personal space, former clients, etc was in the VM. I could snapshot and/or clone the VM. Additionally, I could back up the entire VM to different media. If I was alternating clients, not a problem with mixing emails, or code bases.
When I left a client, I would have them ensure that my deliverables were all in place on their network, then i would have them watch as i deleted the VM, any clones and backups from other media ensuring a clean break. (Also ensured any call could be answered with, I'm sorry, you watched me delete the work space. I cant help.