Thanks for the hilarious question. Might I rephrase like: do you know of many buildings or constructions of a couple of centuries old without any kind of maintenance, that is still recognizable? Let alone operational, in case of a machine?
Let's look at some examples. You talk about a hangar. Just consider your house. How much wear and tear do you see after say 5 years of no maintenance? Paint falling off. Corrosion, wood rot, dirt. After some 20 years of no maintenance or cleaning, it might well be overgrown with plants. You want to add two zeros? Nothing might be left all.
Let's look at climate. Here in Northern Europe, everything might be wiped out by the next ice age, think of an ice glacier of thousands of meters high pushing from the north. Ice ages appear roughly every 10,000 years, and the last one ended about 10,000 years ago, so the next one will most probably be within your time frame of 5,000 years.
Then infra structure. A plane is nothing without infrastructure, like runways, communication, trained personel, fuel of a precise composition, and maintenance. Lots of parts have maintenance schedules based on time, like a checkup every month, or six months. Suppose that after some extreme time frame a part may be in perfect condition, e.g. a turbine blade. If it is not checked up regularly according to its maintenance schedule, it cannot be certified for operation. So in case it might "work", it is useless from the point of certification. Who would risk his life just to "try out" if it would fly?
I mentioned runways. I remember having seen an asphalt road literally disappeared after being abandoned for some 20 years.
How about robbers? I would guess that within a few years the plane would miss essential parts due to robbery. The pyramids prove that even a tough cover will not stand robbery.
Nice question anyway.
Update:
Yesterday, I unpacked my old record player. You know, from before the compact disc we had those vinyl records? Now, my record player was wrapped in plastic when I moved, and stayed wrapped for perhaps 20 years. Was it operational? In principle, yes: motor, plateau, levers, pickup element, wiring, hinges, cables, even my self-built pre-amp worked. Only one part failed: the rubber belt between motor and plateau was, hum, melted, or, transformed. It was broken in pieces, and most pieces were like peanut butter, or tar. A few pieces could be lifted and removed, other pieces had literally be scraped away. I did not manage to get all sticky tar and rubber away.
Ok, I did get the thing to work with an improvised belt, cut from an old bicycle inner tube, a recent one. But this reminded me of the question about the 747. Just cut the requested timeframe of 5,000 years by a factor of 200 and possibly essential rubber parts may detoriate to a point that it is hardly recognizable.
The moral of the story is that you do not want to try such old equipment. I wanted to try the record player because some people here got renewed interest in vinyl records. But why? Records got dust and ticks, and sucked. Compact disc, a huge improvement, sucked too. Digital music on my hard disk, or the cloud, is much better. Same for airplanes. Even now the 747 is considered to be outdated: too much noise and pollution. Let alone after the next couple of generations of aircraft. Even if the old museum stuff could be flown, you do not want that. Really.
Update may 2021. Middle/end of Corona Covid-19 pandemic.
More than half of all airplanes worldwide have been grounded now for about a year. As the severity of the pandemic decreases, air traffic is started up again. Experts warn for technical problems because of this mothballing which was only a small fraction of 5000 years.
At 9 january 2021, a Boeing 737 from Sriwijaya Air crashed in the Java Sea (Indonesia) 6 minutes after takeoff, killing 62 people. Experts call as probable cause: storage with no flights for 9 months, and taken back into service too fast.
After a period of no flights for 9 months, the plane was inspected, approved, flown from storage in Surabaya to Jakarta on 14 December, and resumed passenger service the next day. After 132 flights, it crashed at 9th of January. See https://www.nytimes.com/2021/01/13/world/asia/indonesian-plane-crash-mothball.html and https://www.telegraph.co.uk/news/2021/01/13/indonesian-airliner-crash-may-linked-plane-grounded-nine-months/
So, even if the plane "looks good" after just 9 months of careful mothballing, it may not be safe to fly. Let alone when it does not look good after being left abandoned in a hangar for five thousand years.