BUG: pandas.to_datetime() does not respect exact format string with ISO8601
- [ ] closes #12649 (Replace xxxx with the GitHub issue number)
- [ ] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [ ] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [ ] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [ ] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

---

EDIT (by MarcoGorelli): this is something @nikitaved, @FDRocha, and I started working on together at a company retreat
This is vendored from numpy - can you also check if there's something like this upstream? If not may be worth doing there as well Thanks @WillAyd for your review, I've learned a few new things!

I wasn't sure how to pass a character (like `ymd_sep`) to `strncmp`, so I did `const char tmp[1] = {ymd_sep}`, is that alright? Just a merge conflict otherwise very nice! Thanks Will and Matthew for your reviews/approvals!

Let's ship this then, and thanks @nikitaved and @fdrocha for the collaboration Thank you very much, @MarcoGorelli, @fdrocha , @WillAyd , @mroeschke , for this amazing experience! I would really love to contribute more :)