A thread lubricant reduces friction, which is a crucial element in thread galling. Or there are some outstanding PTFE-based coatings for stainless steel fasteners. They can drastically reduce the frictional coefficient.
You can use coarse threads as they have a larger thread allowance and are more tolerant to rough handling.
Sometimes, an increase in speed during installation increases the heat between the threads. Lowering the wrench speed during installation and removal can help avoid galling.