I think it may be possible to do 2002 turns!
I'll give an outline first, then the details.
Turn 2000 is the same as before (get to Moloch's Sanctum and put on an amulet of life saving), except that we end in unicorn form.
Turn 2001, 1st action: Drink a cursed potion of gain level to go up.
Monster action: Get sent to level 1 with the Amulet of Yendor as before.
2nd action: Go to the Plane of Earth.
Monster actions: One hypercharged monster digs a path to the portal to the Plane of Air, and an engulfing monster carries you into it.
3rd action: Kick a monster and hurtle into the portal to the Plane of Fire.
Monster actions: A monster drinks a cursed potion of invisibility, setting multi to -1. Get engulf-carried into the portal to the Plane of Water.
At the start of turn 2002, hatch eggs to fill land spaces and create a tame monster in nearby water, and polymorph into a ceiling-hider.
Turn 2002, 1st action: Displace the tame monster with command repeat, drown and get lifesaved, and 200 teleport fail onto the portal to the Astral Plane.
Still 1st action: Hide on the ceiling.
2nd action: Cast turn undead to produce monsters.
Monster action: An attack makes you drop onto the high altar.
3rd action: Offer the Amulet of Yendor.
So how do we get this all to work? One key component is that we can produce many kinds of monsters with the iswiz flag set, by hitting duplicates of the Wizard of Yendor with the green slime's attack to turn them into green slimes, then polymorphing them. These monsters will follow you even if not adjacent once you have the Amulet of Yendor (see the function keepdogs). We will use this for the monster that drinks the cursed potion of invisibility and for the second engulfer (it has to be a different monster, because a monster that steps on a magic portal will thereafter know about such traps and avoid them).
For the Plane of Earth, we should have the digger be scared, so that it moves away from you and digs a straight line to a cavern as shown: (The Elvenking is represented by a 9 to avoid confusion with the player.)
...
.... ..
..... ... ..
.... .... ...
.... ... .... ... .
.. .. ....... # . ..
.. ... # .
. .. . # ...
.. .. . .. # .
.. ... . #
... ... #
.. ... .. #
.... .. #
.. H..
.. .....
... 9.@
....
..
No digging monsters naturally follow, so we make it a peaceful shopkeeper; shopkeepers have special movement determination when they are near the player, so we have to make its initial position 2 squares north and 1 square west of the starting position.
This also serves a second purpose. Notice the check if(minr < SQSRCHRADIUS && appr == -1) on line 872 of monmove.c; it appears to be intended to handle when the monster has found an item it wants, but it is also satisfied when minr is decremented on line 797, and the result is that a hostile fleeing monster at an L
∞ distance of exactly 4 from the player moves towards the player. This means the monster has to be peaceful, but peaceful non-shopkeeper monsters have no inclination to move towards or away from the player (line 732).
To make sure the monster with the cursed potion of invisibility does not drink it prematurely, we give it other items to use first; we can use potions of gain level, placed after the cursed potion of invisibility in its inventory list (it will use the last one -- see find_misc). We can get some luck manipulation in from this, as noncursed potions of gain level result in one RNG call for the increase to the monster's maximum HP, while cursed ones do nothing here. You should check whether potions of gain level are milky or smoky potions; if they are, that adds more randomness and might introduce some complications. Since we are probably hypercharging the monsters in air elemental form, we can set up the inventory by dropping items inside it.
The first engulfer also has to be made to follow, and it can't be a pet or shopkeeper because of their special movement determination, so I think it has to be an iswiz monster. (We can get more than 2 such monsters by killing and reviving them.) In that case, to make it move while engulfing the player, conflict won't work; we could make it peaceful while still having conflict, or we could make it confused and luck-manipulate the confusion to not expire, or we could make it invisible (in which case it has a 1/3 probability of moving).
To make sure it goes in the right direction, we could try to get another monster to follow behind it once it enters the tunnel so it cannot move backwards. If we do it in only one engulfing, this could be the second engulfer; otherwise it would be better to use some other monster so it can't mess things up.
We could get in some more luck-manipulation in the generation of the Plane of Air by bringing one or more of the monsters created there to near extinction and retroactively adjusting exactly how many of them are left. (Probably air elementals and/or fog clouds, as the most numerous ones.) Do not make them completely extinct before getting there, though, as that would affect random monster generation elsewhere. I think the best way to do this is to use cursed scrolls of genocide, which create up to 6 at a time, and a good way to get lots of scrolls is also using cursed scrolls of genocide -- creating paper golems (then polymorph the scrolls).
For the start of turn 2002, we can retroactively adjust the sizes of the stacks of eggs to luck-manipulate to get the following polymorph.
I also came up with another method, which is probably harder: the Plane of Fire is done by throwing a heavy iron ball (since we haven't been in air elemental form, we can maintain punishment), then on arrival to Water, get adjusted off a monster to over the water, having changed to a flying form on the turn boundary, and this time we have to use the monster turn to fill the level, by having monsters read cursed scrolls of create monster (these are more iswiz monsters brought along, or possibly some of the same ones used earlier; helpfully, this creates monsters on land because the monsters reading the scrolls are on land, but by my calculations it is still difficult to reduce the empty space enough for a good chance at getting the portal, considering that the number of monsters we can bring along is limited to 7 or else we'll be surrounded by them on Air and Fire), drown and 200 teleport fail onto the portal, and on the Astral Plane, cast turn undead to produce lots of monsters and get engulf-carried onto the high altar (we arrange the corpses to get a tame hypercharged giant on the altar, and have a path of monsters that it will attack leading from there to where you are, surrounded by monsters it will not attack, so it clears that path and breaks down the doors, with a hypercharged ochre jelly following behind it, and at the end it makes way for the ochre jelly to approach and engulf you, and it follows the path back to the altar, followed behind by some other monster).