Everything in the background animation is just a series of loops. I created two fence posts that were slightly different, created a motion path using a shape layer, then copied the Motion Path and pasted it to the position property of the fence posts. I then added a scale animation, duplicated the layers a few times, sequenced the layers using a significant overlap to space out the layers, then set the work area so that the first and last frames were identical. That comp was duplicated, trimmed to the work area, again making sure that the first and last frames are identical, then pre-composed. The main comp was then extended, Time Remapping was applied, a new keyframe was added to the last visible frame, the last time remapping keyframe was deleted, so the first and last frames are identical, then a loopOut() expression was added.

I've uploaded the project file for you to take a look at.
If you create the original art in Illustrator and follow the same motion path scale routine, you could probably recreate the exact animation using a separate comp for each of the elements and have the whole thing done in a couple of hours. My project took about 10 minutes.