Jokes aside, people already can "undo" or "cancel" their unconfirmed transaction thanks to existence of RBF and full-RBF. They just need to use wallet which support such feature, such as Electrum.
My idea of RBF is when your transaction is unconfirmed after a long time of being initiated, maybe miners dropped it because of low transaction fee, you can initiate another transaction with a higher fee to replace the former. If this happens, it means the later transaction is still going to be broadcasted in the network. How then do we replace the former and ensure that the later is also not processed in the network.
Sorry if my question appears amateur. Last week I read about RBF (Replace by Fee) and CPFP (Child Pay for Parent).
If you want to ensure both former (1st) and later (2nd) transaction never confirmed, you justneed to create 3rd transaction using RBF or full-RBF feature.