The kind of things that effect transmission operation are:
Lack of maintenance
Low fluid level
Worn out clutch packs
Worn out or broken bands
Bad pump
Electrical problems
Internal leaks due to blown gaskets/seals
Broken internal parts
Bad torque converter
IMO, while some DIY'ers are capable of rebuilding an automatic transmission, most of us would do better to have it professionally rebuilt (and getting a warranty). Otherwise you're in for a lot of work and likely in for a poor result. An automatic transmission has many 100th's of parts and it is the most complicated piece of your truck. Knowing what's wrong usually requires total dis-assembly, then knowing what to look for and knowing what to replace. I do nearly 100% of my own repairs, but an automatic transmission is not something I would attempt to repair. If you want to try there are some relatively easy things you can try w/out having to remove the transmission (like replacing solenoids, springs and valve body gaskets) but w/out proper diagnosis you might just be wasting your time and money.
The 4R70W is one of Fords better, more reliable transmissions, but all auto transmissions eventually wear out. At 240k you're getting to where you can expect problems. Some transmission will last longer, some not as long. A lot depends on luck, maintenance and how/where the vehicle was driven/used. You can have it rebuilt or try a used transmission, but buying used you don't know what you're getting. You might get a good one, but being 15-20 years old it probably will have a lot of miles on it.
The 2 things that tend to put Gen II Explorer's in the salvage yard are SOHC V6 timing chain and transmission problems, which are more common on the V6 trans. If you have to spend a couple of grand having a trans rebuilt on an '01 you have to first ask yourself it's worth it? Have you been maintaining the vehicle well and doing PM and replacing parts as necessary? Is the engine burning oil and/or making noise? How many more miles do you expect to get out of it?
I have a very nice '01 EB 5.0L RWD with under 200k on it. It was well maintained by it's PO and I also keep up with it's maintenance. If the transmission went out on it tomorrow I'd have it rebuilt, no doubt about it. If the trans went out on my '97 Sport with 265k+ on it, it would get scrapped or parted out in a heartbeat. If my '00 XLT 5.0L or either if my '00 Mountaineer's transmission's go out I'd really have to think hard about having them repaired them due to their general condition and number of miles.