There are several precautions you can take to prevent lock malfunctions during travel.
First, invest in quality locks, not cheap, flimsy options. With stronger materials and better features, your suitcase locks will be less prone to breaking or jamming under travel stresses.
You also want to test your locks at home several times before you pack anything. This will ensure that they're working smoothly and allow you to catch any potential issues before you're at the airport. Another one is to save any combination you're using on your locks. You can consider using a password manager app or a secure note on your phone for extra security.
The last is knowing how to reset suitcase lock, or set it properly in the first place. This is important, especially if you need to reset the combination or buy another lock/suitcase during your trip. You never know when unexpected situations arise, so it’s always best to be prepared.
Safe travels!