In any case, the number of doors is finite.
What I asked about, what must be done to consider dungeon as visited?
Also, how the spell even analyzes visitors? Does it have some kind of mind or at least a database?
Will this "database" accept that the dungeon is finished, if the visitor himself believes it is finished?

If Xykon thinks that he actually visited doors marked by MitD, is it enough that the spell will also mark them as done?

If I remember correctly, it was never explained what turns dungeon into "finished" state.