Most grammarians agree that modals are 'messy' - it is impossible to define the meanings precisely and simply.
Very crudely, when we are talking about situations in the past could means 'had the possibility/ability to', and was/were able to means 'had the possibility to and did'.
At the age of ten, Peter could speak three languages fluently. Presumably did speak them, but we are told only that he knew how to.
About six months after we moved back to England, a French family with a child of my own age moved into the house next door, so I was able to speak French again. Presumably he had the ability all the time, but not the opportunity, until the family arrived; then he did speak French again.
In the negative form, the difference is not so important, because the activity did not happen.
:tick: I was able to get back to England in time for the birth of our child.
X(?) I could get back to England in time for the birth of our child.
:tick:I couldn't/wasn't able to get back to ngland in time for the birth of our child.
When the context makes it absolutely clear that the activity did take place, then it is possible to use could when we might expect was able to, as Raymott has shown. Even in these situations, a listener might ask, "But did he/they actually do it, then?" The learner is safer using was able to.
That is my opinion.