Why do you say “drive(s)”? Is this or similar happening with more than one drive?
If the other drives are working fine, then you might already have your answer. If they’re not, it sounds like the enclosure.
If you think it’s drive, try putting it in the freezer for an hour to see if anything changes. It wouldn’t be a permanent fix but, if the problem temporarily goes away, it’ll make clear that the problem is the drive, possibly due to add solder joints.