Often badly damaged aircraft were diverted to nearby airfields or were ordered to land on different runways. That way, if they did crash, they didn't interfere with other plane landing.
I think that the order of landing priority was:
1) Planes with wounded crew.
2) Planes with critically low fuel.
3) Planes with mechanical problems which have a high chance of landing safely, e.g., one engine out for a 4-engine bomber.
4) Planes with mechanical problems which might cause them to crash when they landed, or which caused a risk to life and property: landing gear failures, ordinance that can't be released, stuck flaps.
Also, keep in mind that a plane with a mechanical failure was likely to straggle in after the undamaged planes had landed. Also, for planes with serious damage or seriously low fuel, the crew could divert to a forward landing strip, crash land or ditch at sea. And, least in the ETO, the USAAF and RAF maintained a number of emergency airstrips right along the coast so that planes returning from missions from occupied Europe could land immediately if necessary.
So, if you wanted to be ultra-realistic for, say a 1944-era U.S. heavy bomber squadron, you'd have the main formation of lightly damaged or undamaged bombers returning to base in something approaching their original formation. Once they were near the base, planes with injured crew but which were otherwise only lightly damaged, would get priority landing. In some cases, planes with injured crew would be diverted to nearby bases with better medical facilities.
Next, planes with critically low fuel would get landing priority, assuming they hadn't landed at a forward base or hadn't diverted to another airfield.
Then, sometime later, stragglers with serious damage would start coming back. The most seriously damaged would have their crew bail out over land while the pilot and co-pilot attempted a crash landing or a landing at an emergency airstrip. If that wasn't possible, the plane would alert air-sea rescue and then ditch just off the coast (aircrew avoided bailing out over water if they could avoid doing so, and a B-17 or B-24 with mostly-empty fuel tanks could float for quite a while, giving the crew plenty of time to get into their life rafts). If that wasn't possible, the crew would attempt to bail out over land or close to the coast, after pointing the aircraft away from land.
The less seriously-damaged stragglers would attempt to land at their home base if at all possible. They'd alert air traffic control as to their situation, so that fire trucks and ambulances would be ready next to the runway in case of a crash. If there were multiple planes attempting to land, it would be likely that one of them would be diverted to another airfield. (By 1944, the UK was covered with military airfields, especially in the South and East, so the nearest alternate airfield might just be 5-10 miles away.)
Planes with damage which made landing risky would often hold off landing. They'd attempt to jettison ordinance, burn off fuel and allow crew other than the pilot, co-pilot and engineer to bail out. Then, once conditions for landing were as good as they were going to get, the remaining crew would attempt a landing. Several U.S. airmen won the Medal of Honor for attempting risky landings in attempts to save badly injured crewmen who couldn't bail out.