Basically, if an entity has invested $X into RND for patent Y, then patent Y should be valid until some $(Z*X) has been earned by the entity. Where Z is some constant; or stepped like tax brackets.
Example: A company develops some new software: it cost $500,000 of Engineering effort. They are awarded a patent. The patent should be valid until that company has earned $5 million (Z=10; ie 1000% ROI).
Example: A company develops some new drug: it cost $5,000,000,000 for RND. They are awarded a patent. The patent should be valid until that company has earned $50 Billion (Z=10; ie 1000% ROI).
I agree it may be hard to prove "amount spent on patent" or "profit earned from patent". However, at least to me, it seems as hard as the IRS auditing a company's taxes, or as hard as auditing a public companies quarterly financial disclosures.