What do you optimise for?
Number of lives saved? Number of Years saved (so better to save someone with a life expectancy of 40 years than 2 people of LE of 5 years each)? Do you remove ventilators from those who it's just delaying the inevitable? How to do you factor in non-covid cases?
Do you take into account how "good" the patient was? Were they self isolating or did they go to a pub lockin? Have they been hoarding toilet paper? Do you save the person who caught it performing CPR? What about the Key Worker who caught it while delivering food to the town? How about the dumbass politician who's encouraging people to ignore the restrictions?
I will say working in a Trauma and ICU rooms, families are generally well aware of the decisions to be made when it is time.
500 people outside need ICU beds, 6 patients have just died, so you have 6 new beds open. Which of the 500 do you treat?
They are assigned a triage score and that score will be updated routinely. As beds open, the people who fit the criteria get the bed. I believe that is fairly standard in a public hospital type setting.
I have only ever worked in public and military icu, wards, er and trauma rooms so I do not know too many details on how that works in practice.