In the past, the best way to remove moire was to shoot with the right equipment. Many old (and modern!) cameras have an anti-aliasing filter (also known as AA filter) that removes moire effect in-camera. The point of the filter is to help avoid moire pattern even when you’re photographing tiny details. The disadvantage of anti-aliasing filters is that they create more blur. This blur is a problem if you want your details to stand out. For this reason, many of today’s cameras don’t support this filter anymore.
There are many ways you can avoid and remove moiré patterns on your own.