Overfitting on small dataset to check if model is good I've learnt that the good way to test your deep model if it can solve some kind of a problem is to overfit it on a very small dataset (something like 5 inputs). However, I've worked with models which are unable to overfit on that small dataset but are able to learn something from a whole dataset and generalize well.
My question is, is the method I mentioned a good way to test if my model can solve some task? If not, do you have any other recommendations for how to check that?

I use the proposed method just as a bug detection: if my neural network does not provide good results, I try to fit a small batch to see if there is any bug in the network architecture or training loop that fully prevents learning.
It does not tell you anything about the model's ability to solve the actual task because the model is most likely overfitted and just memorizes the training examples.
In general, you can not check if your model can solve a problem without trying to fit it to the training data set since the model's ability to solve a problem depends on the signal-to-noise ratio in the data.
I doubt that you worked with neural networks that could not overfit a small batch but were able to learn well on the full training data. However, this could happen for simple models like linear regression with only a few input variables.
