How to limit to one item and one quantity only per checkout?

The fact that this isn’t a feature blows my mind. “There’s an app for that”. Yes, we know. There is always an app for $10/month to do some mundane task. It’s ridiculous that I’m an admin of a Plus shop and have to custom code this feature. So so many of these types of things on these forums marked “solved” when the solution is “here’s another app” or “Send us a feature request”.