I would not worry much about a m.2 device overheating.
It takes about 30 seconds of continuous sequential data transfer for a m.2 to heat up sufficiently to throttle.
At that point, it simply slows down until the situation improves.
No harm is done.
Yes, there are some m.2 that come with heat sinks, and there are aftermarket heat sinks. In either case, a bit of airflow over the device is needed to keep it cooler.
If you think about it, this is another negative for aio liquid coolers; they rob the motherboard from the airflow which a air cooler gives.