While accounting for situations like operational upgrades might be a challenge to code, perhaps a simpler solution (that I think would be relatively easy to accommodate with the existing interface) would be, for a given route/flight, to choose to sell one cabin as a lower cabin. This could be simply accommodated with a check box next to where the fare is indicated.
Example 1: Plane configured with 140Y and 12C; I could select, for that route, instead of entering a fare for Business Class to check a box that says "Sell Business as Economy" - and the business seats would just be counted as economy seats on that route, so I'd be selling 152Y seats on that flight.
Example 2: Plane configured with 160Y, 15C, F5; I could select to sell F as C and C as Y, making it 175Y and 15C.
For a real world reference, AA used to sell the C cabin as Y on all their 3-class 772s for domestic flights. Not upgrades, they were just sold as Y seats. They were flagged as 'premium' so only bookable by frequent flyers, but they were otherwise no different than Y seats from a revenue management perspective.
For another real world reference, OZ regularly sells their F cabins as J on intra-asia flights. I've been on two flights where this was the case - a 744 and a 772, where the entire F cabin was sold as J and offered, again, to frequent flyers.
By making this an all-or-nothing choice when creating/editing the route, it should make it relatively more easy to implement than trying to code in some logic for paid upgrades or opups.