Usage of swap or virtual memory is already considered in the way that it has always worked on regular operating systems. To explain this it's important to understand the following:
The amount of RAM that is available in the EOS blockchain is basically just a configuration parameter of the blockchain itself. It doesn't mean that the block producers actually have that exact amount of physical RAM in their nodes.
When you store things in the EOSIO DB tables, the nodes will keep that memory in RAM if they can, meaning that their physical RAM might already be full and the OS of the node will start using swap memory instead. This allows the blockchain's RAM to be way more that what a node physically has, but it has negative impact on the performance of the node in case the physical RAM fills up, because then it will start needing to swap memory on and off between the physical RAM and the storage device (hard drive/SSD). These operations take long compared to operating directly on physical RAM, and thus the transactions will take longer to process. This can cause the node to miss blocks if they are a block producer!
Fortunately, as explained by Dan Larimer in this article, operating systems prioritize keeping in RAM the most frequently used memory (or the memory that was accessed most recently), and in any case, the actual RAM usage in the blockchain is still very low - the speculation in the RAM market is what made it so expensive, not the actual usage of the RAM that was being reserved.
I recommend reading that article to understand better the details of the situation, as Dan explained it quite nicely.
Regarding your point about having a functionality of doing a "backup" of the DB tables into IPFS storage and being able to restore it back to your RAM when you wanted to use them again, I think it could definitely be a useful feature, especially for taking and archiving snapshots of token balances or other interesting use cases like that. In technical terms, I don't see why it wouldn't be possible to implement, but it would have to be at the base layer of the blockchain probably, maybe allowing the IPFS storage functionality to take the data directly from the DB. Of course, it all depends on how exactly they end up implementing it though. You could contribute by opening an issue in the EOS Github repository to suggest it! Be sure to add details about possible use cases, etc.
I hope this clears your doubts.