The heat given off by my Samsung T5 is barely noticeable. The drive does not have protruding feet and lies flat which means if it was going to heat up, then even one sitting flat on your desk would heat up. You should be okay.
Mine don’t get hot but I haven’t stacked them. I have different catalogs on them so I usually use them one at a time. Even if they do seem hot when you try this I’m sure putting tiny rubber feet dots from a hardware store (just a couple mm tall) on the bottom would be enough to separate them and keep them cool and from sliding around. But I doubt they would get very hot unless you are constantly reading and writing to both and in a hotter room.
I'm pretty sure that would be perfectly fine. Go for it. If you're worried, just check if it's hot when using it. I've been thinking I might do the same.
I cloned the stock Fusion drive in my '12 iMac with CCC onto a Samsung T5 for backup. When it was done doing that, it wasn't even noticeably warm. I think you'll be fine.