A proposed point of resemblance must be intelligible and appropriate for both compared terms. In the grammar-and-salt example, simply transferring “too much salt” to “too much grammar” fails because the two are not measured in the same way.
Better analysis: Find the common function or outcome, such as improving the fitness of speech and food.
Poor analysis: Transfer every feature of the comparison object to the subject.
The general principle is that a simile selects a relevant respect. It does not commit the speaker to sharing every property. This matters especially when judging imaginative comparisons.