The Argentinian film Moebius (1996) [1] is based on that story.
I remember this from childhood and tried to find it several times. Nice story. I think of it often when certain software systems I work on become overly complex.
Available in .mobi format.
If you happen to be familiar with the MBTA, the opening is a treat.
I remember being scared by this as a kid.
This immediately made me think of the Heinlein story, "And He Built a Crooked House."
https://en.wikipedia.org/wiki/And_He_Built_a_Crooked_House