On stopping the drift, since the structure only survives if adding a category is hard.
One rule: never create a category to file a single transaction. That single rule prevents ninety. If something does not fit, it goes in everything else, and if everything else becomes large and interesting, then you split it: deliberately, once, with a reason.
Write the rule for each category somewhere. One line each: food in means anything bought to eat at home, including the corner shop. It sounds excessive and it is what stops you making a different decision in March than you made in January. Your groceries-versus-supermarket problem is entirely a missing definition.
Let the automatic rules do the boring majority. Most apps will learn or let you set a rule per merchant. Set those for your twenty most frequent merchants and ninety percent of transactions file themselves correctly forever.
Hand-sort the remainder once a week, in one sitting. Five minutes.
Split transactions sparingly. Splitting a supermarket shop into food and household is where a lot of effort goes for a number nobody acts on. Put the whole thing in food in and accept a small imprecision.
Precision is not the goal. A number you look at is worth more than a precise one you do not.