I kind of had the same thought about if someone showed up to look at my vehicle and wanted to hit it with a hammer. Just didn't seem right but thought it might be acceptable in the community since rust is a factor. Wasn't sure.
Most people selling TJ's don't know that rust is a problem for them. A lot of the nicer TJ's are sold by people who barely know a thing about them. Wanting to hit the Jeep with a hammer will probably throw off a lot of potential sellers. You should be able to tell the condition of a frame by simply looking at it, feeling in the holes, and using an endoscope camera to make 100% sure. Smacking it with a hammer isn't going to tell you all that much.
Another way to learn about a Jeep before you go see it is to use the build sheet. If you know the vin number, you can find where the Jeep was originally shipped and purchased. If you find a Jeep for sale in Alabama that was originally shipped to Alabama, there is a good chance that it has seen a very minimal amount of salt.