All it takes is an involuntary movement of your thumb double-tapping a picture to send you into panic mode. Even if you “unlike” a post right away, that user can still receive a notification that you’ve liked their post.
If you want to scroll through someone’s feed and prevent a situation where you accidentally like a post from years ago, you can do so by using airplane mode. First, allow all the pictures to load, then turn on airplane mode and scroll through those pictures. Even if you double-tap on a picture and the heart icon turns red, it will disappear within seconds, and no one will get notified.
Another tip if you accidentally like a post from years ago is to quickly unlike the picture then scroll to the top and like the most recent picture. The user will receive a notification that you’ve liked a picture, and it will link back to the most recent post.