I will divide this answer into 2 parts.
1. The methodology
Define a "loop container". It is well known that you can divide 60 by several numbers. 2, 3, 4, 5, 6, 10, etc. This means that you can make a big loop of 60 frames and several sub-loops of smaller sizes and repeat them. You can fit 2 loops of 30 frames, 10 loops of 6 frames, etc. You do not need to use 60 or multiples of 60. You can use 20 if you want and have subloops of 5 for example.
But using a loop container is to optimize the loop, in the case for example if you need an animated gif. If you only need a video, you can add some randomness. You are not limited by the total number of frames.
2. The software
Use whatever you want or whatever you can. That animation could be a hand-drawn image on paper, digitalized and painted inside Ps, (or any other paint application, from which dozens exist), Or painted directly on that application.
Just keep separated the assets that are movable. The arm, the mini robot; and the elements that cover those pieces, the torso of the girl, the window, the city background.
Yes, you could hand-draw each frame, of those assets.
I would not assemble them inside Ps. There are far better programs to do that. Any video editor will be better. If you name a sequence, for example, the arm, as Arm-01.png Arm-02.png, etc. The video editor could import that as a sequence. Then you just paste the assets on a layer and compose.
The train does not need to have more than 1 image, it just has an original position and an exit position.
Use Premiere, or if you are not paying for the full Adobe suite, use Davinci Resolve.
Some animations do not require you to draw more than 1 image. You paste it into a "mesh" and deform the mesh.
Here is an example: https://youtu.be/TNjIyaVvPdg?t=32
You can do that in Blender. https://www.blender.org/