Now what about an option to modify a transaction (already sent to the memory pool and pending) sending a new one changing the outputs and increasing the fees so the original transaction is replaced by the newly crafted one, so the funds can go back to the wallet or just go to someone else.
What you are describing already exists, and is known as double spending. It is generally something to be avoided rather than encouraged, as it is a way to steal from someone you are trading with.
Let's say I craft a transaction which sends 1 BTC to you with a low fee. You see the transaction in the mempool, but with zero confirmations, and release whatever goods or coins I was buying from you. As soon as you do so, I craft a new transaction which instead sends the same 1 BTC back to me with a much higher fee. My second transaction (with the higher fee) is likely to confirm first, and so I end up with my own 1 BTC back again, as well as having the goods or coins you sent me. I have now successfully stolen from you.
Many nodes will automatically reject a transaction if they detect it is a double spend.