A book, London Labour and the London Poor (Vol. 2 of 4), by Henry Mayhew (1851) has detailed information on the process the nightmen went through. This was a little later than the medieval time frame specified, but there is no reason that these same techniques wouldn't have been in use at the earlier times. One passage, in fact, relates to the historical nature of the process (emphasis mine):
Nightwork is carried on—and has been so carried on, within the memory
of the oldest men in the trade, who had never heard their predecessors
speak of any other system—after this method:—A gang of four men
(exclusive of those who have the care of the horses, and who drive the
night-carts to and from the scenes of the men’s labours at the
cesspools) are set to work. The labour of the gang is divided, though
not with any individual or especial strictness, as follows:—
The holeman, who goes into the cesspool and fills the tub.
The ropeman, who raises the tub when filled.
The tubmen (of whom there are two), who carry away the tub when raised, and empty it into the cart.
Note that only one individual actually enters the cesspit, when necessary. The next few lines describe a typical location where the nightmans work takes place:
The mode of work may be thus briefly described:—Within a foot, or even
less sometimes, though often as much as three feet, below the surface
of the ground (when the cesspool is away from the house) is what is
called the “main hole.” This is the opening of the cesspool, and is
covered with flag stones, removable, wholly or partially, by means of
the pickaxe. If the cesspool be immediately under the privy, the
flooring, &c., is displaced.
So we can see the usual location is often quite near the surface. Later a description discusses how lanterns were actually deployed at the work site:
On one occasion I went to see a gang of nightmen at work. Large horn
lanterns (for the night was dark, though at intervals the stars shone
brilliantly) were placed at the edges of the cesspool. Two poles also
were temporarily fixed in the ground, to which lanterns were hung, but
this is not always the case. The work went rapidly on, with little
noise and no confusion.
The scene was peculiar enough. The artificial light, shining into the
dark filthy-looking cavern or cesspool, threw the adjacent houses into
a deep shade.
From this we can see that much of the work was done from a surface level, and though Lanterns were used, it was not necessary to enter the dangerous areas with the lanterns. The lanterns were placed nearby or suspended over the work area.
More information concerning the use and cleaning of cesspools in France, also from the 19th century, can be found in the book Mission and Method: The Early Nineteenth-Century French Public Health Movement By Ann Elizabeth Fowler La Berge. Though I find nothing concerning the use of lanterns, it does discuss that by the 1830s the need for ventilation to remove the noxious fumes was understood:
Before the 1830s, when the situation came to a head with the increased
water supply, hygienists devoted their attention to improving the
existing cesspool system. Hygienist and industrial chemist Joseph
d'Arcet emphasized improved ventilation and developed a system of
forced ventilation, whereby noxious gases would be blown off into the
air above the house though a tall chimney
The same plumbing concept is still used today in modern construction, with each home plumbing system connecting to an external vent on the roof to allow the lighter gases to harmlessly dissipate overhead.
This gives us a hint that there should be no issue with lanterns when mucking out a cesspit. Logically any opening large enough to admit a person or bucket will allow any trapped gas to dissipate rapidly into the air above. Since most of these cleaning processes discussed involve first pumping out or bucketing away liquid wastes, there should typically be plenty of time for any built up gas to escape, or at least reach concentrations lower than the 5.4-17% concentration by volume required for flammability.
The first book also discusses the problems of gas in the sewers of London.
There are two modes of purifying the sewers; the one consists in
removing the foul air, the other in removing the solid deposits. I
shall deal first with that mode of purification which consists in the
mechanical removal or chemical decomposition of the noxious gases
engendered within the sewers.
This is what is termed the Ventilation of the Sewers, and forms a very
important branch of the inquiry into the character and working of the
underground refuse-channels, for it relates to the risk of explosions
and the consequent risk of destruction to men’s lives; while, if the
sewer be ill-ventilated, the surrounding atmosphere is often
prejudicially affected by the escape of impure air from the
subterranean channels.
The article discusses an experiment done to determine the probability of explosions from the use of lamps in these locations:
A survey as to the ventilation, &c., of the sewers was made by Mr.
Hawkins, Assistant-Surveyor, and Mr. Jenkins, Clerk of the Works. Four
examinations took place of sewers; of those in Bloomsbury; those from
Tottenham-court-road to Norfolk-street, Strand; from the Guard-room in
Buckingham Palace to the Horseferry-road, Millbank; and in
Grosvenor-square and the streets adjacent. There were difficulties
attending the experiment. From Castle-street to Museum-street there
was a drop of 4 feet in the levels, so that the examiners had to
advance on their hands and knees, and it was difficult to make
observations. In some places in Westminster also the water and silt
were knee deep, and the lamps (three were used) splashed all over. In
Bloomsbury the sewers gave no token of the presence of any gas, but in
the other places its presence was very perceptible, especially in a
sewer on the west side of Grosvenor-square, a very low one, in which
the gas was ignited within the wire shade of one of the lamps, but
without producing any effect beyond that of immediately extinguishing
the light. There was also during the route, in the neighbourhood of
Sir Henry Meux’s brewery and of an adjoining distillery in
Vine-street, a considerable quantity of steam in the sewer, but it had
no material effect upon the light.
The examiners came to the conclusion that where there was any
liability to an explosion from the presence of carburetted hydrogen,
or other causes, the **Improved Davy Lamp afforded an almost certain
protection.**
The Davy Lamp is described as :
The Davy lamp is a safety lamp for use in flammable atmospheres,
invented in 1815 by Sir Humphry Davy.1 It consists of a wick lamp
with the flame enclosed inside a mesh screen. It was created for use
in coal mines, to reduce the danger of explosions due to the presence
of methane and other flammable gases, called firedamp or minedamp.
So, if a lamp was required in such situations there was, at least in the 19th century, a safer alternative to a typical open flame.