In theory an engine running with the proper lubricating oil experiences very little or no wear to the bearings, etc. riding in the oil. The oil forms a film that does all the work, preventing metal on metal contact. This is why they say engines experience the most wear at startup. This film requires pressure to develop and once developed, the cam, crank, rod bearings, etc. do not really wear. Theoretically an engine could be run forever in a test bed. One could develop a system to slowly change fluids like coolant and oil with the engine running. One could remove small amounts of oil while adding. This wouldn’t be efficient as there would be a lot of wasted oil by doing this. One would need to use about 3x the normal change for the oil to be “mostly” new and clean with such a system but the engine could stay running. The same could be done with a filter. Install two or more in parallel and isolate the one needing change with a valve on each side. Replace filter, add fluids to makup for lost, then open valves again. Then repeat the process for the other filter.
The parts being lubricated by oil would likely last basically forever in such a scenario. There are parts that will wear no matter what. There is vibration and mechanical stress. Valves wear over time which is natural and unavoidable no matter the maintenance. Metal fatigues over time. Eventually stuff will break like a paper clip you bend back and forth until it snaps. Then there are gaskets and seals. Some of those may wear after a while. I suspect head gaskets and such would fare well in such a test as I am sure a lot of the wear on them is due to heat cycling when the engine is shut off and parts cool and contract, then expand when used and heated up again.
If you switched the engine to natural gas or propane, that would help as well. I have done this to a few small engines and besides a slight derating in power, is by far the way to go! With something not run all the time, you don’t have to worry about gumming up. Also, they burn far cleaner! I mean like so clean you don’t even know they have been run. I am used to changing a generator’s oil at least once per day. The manual states to go 100 hours which I feel is too long. That would be about 6000 miles in a car driven 60mph. For a modern fuel injected car that is fine but not an air-cooled carbureted engine…. Anyway, I decided to try for 50 hours on propane. The next time I changed the oil it looked like it did when it went into the engine! The difference was night and day. I figure next time I will go 75-100 hours if the outage lasts that long.
Then there are engine accessories that all wear. Eventually the engine would HAVE to be shut off for spark plug changes and other maintenance but in theory, you could probably keep an engine running for a very long time if done in a controlled environment with endless fuel and a controlled change method like I explained where a small amount of fluids are removed and added while the unit is running.
Dust coming in through the air-filter is another major source of wear. Filter air to “clean room” specs before feeding it into the engine and that would be even better! Push mowers that are run in dusty grass and leaves are always nasty when I change the oil. Not so much on generators and pressure washers, especially if run on LPG as I mentioned… They don’t work in such dusty environments.
This might not work on some engines as well as others. Some have design flaws that require repair or replacement, no matter how well the engine is cared for.
In real-world use, it is often the body or some other component that rots away or lets go before the engine… My 1997 F250 went off with an engine that seemed to run pretty well although I do think it was starting to lose a little compression after all those years and miles. The body was pretty rotted and a lot of other stuff was just about worn out, never mind the ruined transfer case!