Why couldn't Mitsuha and Taki remember each other's names? In the second half of Your Name (after the body switching stops happening), Mitsuha and Taki can't remember each other's names. They can even end up forgetting the names within 10 seconds of seeing each other. Why does this happen? One theory I have is:


   Before Taki intervenes, Mitsuha would have died when the comet hit. Taki couldn't remember her name because her future was hanging in the balance.


But this answer doesn't entirely work. For one, 


   He still fails to remember her name after they rescue Itomori, and Mitsuha is no longer at risk of dying


And second off


   Taki was never in risk of dying in the comet, but Mitsuha still can't remember his name either.


So why did this happen? I know this is somewhat the main theme of the whole movie, but it never made sense to me how they could forget so quickly. It's almost like something was actively causing them to forget.
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.