There is no way to safely remove 100% of wax from locks without brushing them out. There are chemical compounds out there that can dissolve wax, but they are very toxic to the human body.
However, there are ways to remove some of the wax in locks without brushing them out.
One method involves carefully dipping your locks in a shallow skillet of boiling water. This is best done with long hair, otherwise you run the risk of burning your face or scalp. The heat of boiling water is higher than the melting point of wax, so some wax will break off and separate itself from the lock.
Wax is “hydrophobic,” meaning that it does not dissolve in water. This makes it difficult to melt completely out of locks when submerged in water. So another, more effective way of removing wax from locks is to fold a paper bag around the lock and flat iron around that paper bag on high heat. This will melt the wax out of the lock, and the paper bag will absorb the melted wax.