The Pokémon Company has shared special posts dedicated to Kakuna:
Did you know? Kakuna remains virtually immobile as it clings to a tree. However, on the inside, it is extremely busy as it prepares for its coming evolution. This is evident from how hot the shell becomes to the touch.
Source: @Pokemon