Creating an unique key from a struct to use in mapping

How should one ensure a unique key is always generated when dealing with a struct of the following sorts?

    struct Investment {
        address investor;
        uint256 amount;
        IERC20 from;
        IERC20 to;
        uint256 slippage;

I'm guessing for full guarantees you could include the block number and create a hash from there.
Just wondering if:

  1. there's better ways
  2. how one should go about making a safe hash of these parameters.

hashing the fields together will generate a unique hash keccak256(abi.encodePacked(field1, field2, fieldn))

The same struct will always hash to the same value. If you need to save the same struct more than once, you might need to add an ID field. Including the block number as an extra field might not work, contracts can interact multiple time with other contracts in the same transaction, therefor with the same block number

Have you considered to handle investments as NFTs, even if you don't implement the IERC721 interface? Thinking of investments as unique things (just like NFTs) might be helpful.

Thank you.
Said investments, are stop-loss/take-profit orders made by an investor, to be managed by the contract (in use with an allowance for the token).

I'll look into the NFT suggestion, I think for this particular case they shouldn't be transferable but perhaps there's some other benefits to it.