Here is a take from Google AI on when to use ML:
https://developers.google.com/machine-learning/problem-frami...
"You should understand the problem well enough to list some potential solutions to test first to find the best model" and "it shouldn't be used for a problem that conventional programming can solve" like hard coding a symbolic rule.