It sold a single digit percentage of total iPhones the quarter after the 12 series dropped, which is... millions of units. Not to mention the 2020 SE came out a few months prior to the 12 lineup's announcement, so a lot of people who wanted a small phone had just got one.
The idea that nobody bought it isn't true. It sold under Apple's expectations, but if they set their expectations correctly and didn't cannibalize a large portion of potential buyers a few months before announcing it, I think it could work.
The real story here is that they don't have to make them because people will buy whatever is available. When my 13 mini is getting old, I'll buy a standard size phone because it's all I can do.
It's worth nothing that there are practical costs for a smaller phone: You can't fit as much battery into a smaller package, but people want to use a smaller phone the same way they'd use a larger phone.