COMPAT: make astype to datetime/timedelta types more robust
closes #19116
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/19176?src=pr&el=h1) Report
> Merging [#19176](https://codecov.io/gh/pandas-dev/pandas/pull/19176?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/982e11233698bc54e59be87eb257da2f33b8eb10?src=pr&el=desc) will **increase** coverage by `0.02%`.
> The diff coverage is `100%`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/19176/graphs/tree.svg?src=pr&width=650&token=eZ4WkYLtcO&height=150)](https://codecov.io/gh/pandas-dev/pandas/pull/19176?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master   #19176      +/-   ##
==========================================
+ Coverage   91.52%   91.54%   +0.02%     
==========================================
  Files         148      148              
  Lines       48778    48786       +8     
==========================================
+ Hits        44642    44662      +20     
+ Misses       4136     4124      -12
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `89.91% <100%> (+0.02%)` | :arrow_up: |
| #single | `41.61% <55.55%> (ø)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/19176?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/dtypes/cast.py](https://codecov.io/gh/pandas-dev/pandas/pull/19176/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZHR5cGVzL2Nhc3QucHk=) | `88.58% <100%> (+0.15%)` | :arrow_up: |
| [pandas/plotting/\_converter.py](https://codecov.io/gh/pandas-dev/pandas/pull/19176/diff?src=pr&el=tree#diff-cGFuZGFzL3Bsb3R0aW5nL19jb252ZXJ0ZXIucHk=) | `66.95% <0%> (+1.73%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/19176?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/19176?src=pr&el=footer). Last update [982e112...08499b0](https://codecov.io/gh/pandas-dev/pandas/pull/19176?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
