To keep things nice a organised while animating, I used a technique called pre-comping to nest any looping or composite animation elements. A good example of this would be the fan animation:
The fan was first drawn twice in Illustrator with the fan blades facing opposite directions. These 2 images were then dragged into a separate composition, lined up and then made to alternate using 100% and 0% opacity on individual keyframes spaced one frame apart. These keyframes were duplicated around 10 times.
This composition was then dragged into the main composition, and time remapping was then enabled so I was able to use the looping function.
The loopOut()function was then used to keep the composition looping indefinitely, with a single keyframe being removed at the end to keep the loop smooth without a pause every time it restarts.
Below is an example of the fan animation looping in after effects: