If you want butter, why not just take butter? Butter is more shelf stable than cream, it has more butter in it, and you don't have to worry if you undulated enough on your walk in.

If you like the DIY aspect, fine.... HYOH. I would put some baffles inside the jar to really churn the cream as you walk.

Some people have mentioned making yogurt on a multiday hike. Every night you add powdered milk and water to your yogurt jar and bring it to bed with you. Fresh yogurt every morning.