The game is impossible to complete. Upon reaching the fourth stage, right after the rope bridge section and after setting all the children free, it says "exit through the mineshaft" as usual, but there is none in this stage. Therefore you are doomed!
This is actually an intended behaviour. In level 4, the game code explicitly avoids checking if the player reached the exit:
$675f ld a, ($720d)
$6762 cp $04 ;is this level 4?
$6764 jr z, $66fb ;yes it is so exit to main game loop as no further
;progress is possible.
;when you touch a graphic $31 or $32 (these
;two graphics represent the exit doors when
;you collect a stone) or a graphic $29 or $2A
;(these two graphics represent part of the
;mine shaft) then a flag at $831d is set to 1.
;see $8353 onwards.
$6766 ld a, ($831d)
$6769 cp $00 ;have we touched an exit?
$676b jr z, $66fb ;no we haven't so exit to main game loop
$676d jp $6ff8 ;jump to mine carts/load next level etc.