Why couldn't Mitsuha and Taki remember each other's names?
Losing the associated memories is one of the effects of this mysterious phenomenon that the entire movie is based around, it happened in the scene you are asking about, but it also happened in reference to Mitsu's grandmother. All the supernatural occurrences in the movie are supposed to be caused by the shrine god, comet, the shrine maiden (Mitsu) or some combination of those three. Losing the memories associated with the body-swap/time-travel was quite simply just one of the effects of the supernatural phenomenon surrounding "Kimi no Na wa". 

Going into specifics as to why it was that moment, exactly what memories they lost and why it happened so suddenly starts to enter the territory of artistic interpretation, this reddit post explains a few useful plot moments for understanding this and comes up with quite a good interpretation for why it happened at that moment because it had just reached twilight and they had just left the shrine which holds the symbolic meaning of leaving behind your most precious thing (their memories of each other).

The issue that I think you noticed with your theory is that it limits the forgotten memories to be specifically about death when really it was about much more. The reddit post is just one interpretation, exactly why is really up to the viewer.