Yeah …
Strategies against this include cooking for several people (well, that ain’t happening), doing meal prep several days in advance / cooking larger portions that you can eat over a couple of days, and buying frozen ingredients (still better than buying entire frozen meals). Some non-frozen ingredients keep for a long time, too, e.g. dried rice or noodles, onions, pickled vegetables.
Your emergency meal sounds healthier than most of my regular meals, lol! It’s usually just fries, zucchini and some kind of frozen meat or fish (all baked). Fresh zucchini probably doesn’t last long enough for OP’s needs, but it does last really long for fresh produce. Though part of it is that I kind of follow FODMAP so onions and legumes are out for me.