A few points.
The hard truth that we must all understand is that police pulling over motorists, looking for cash, aren't doing it to fight crime. They're doing it so that they can seize cash and make money for their agencies. They don't care how the motorists got the money. They don't care if they committed a crime or not. They just want the cash, no matter what. There's a prevailing attitude that anyone possessing a lot of cash deserves to have it taken away. How they develop that attitude is a complicated subject, and beyond the scope of what I want to get into. But it's true.
So how do you protect yourself?
The first line of defense is not to get pulled over in the first place. So don't stand out in any way. But avoiding getting pulled over is not always possible, as you found. Sometimes police agencies run operations to pull over people who match their profile, or at random, for the purpose of finding cash. And police will invent a phony excuse for doing so. You've seen how they will tell you to your face a false reason for pulling you over, which you obviously know to be untrue. This is probably for the purposes of intimidating you, making you realize that they're going to do what they want to do no matter what, and making you realize that they really don't care about the truth. Faced with this, it might be good to respond in a way that isn't outright confrontational or argumentative, but that is assertive and lets the officer know that you know the truth and aren't someone to be messed with. So, if the officer says, "You didn't signal," you could respond, "I certainly did signal, maybe there's something wrong with my blinker, could we just check it, please?" Understand that the police are looking for EASY TARGETS. I mean people who are unlikely even to contest a cash seizure, and force them to testify. If you project the image that you know your rights, and will stand up for them later on, if they make trouble for you, they may let you go and look for easier pickings. Officers will not only tell you a false reason for pulling you over, they will also lie about the reason in court later, if it comes to that. But they will be somewhat reluctant to put themselves in that position. So if you make it clear that you are going to have some ability to show that they aren't telling the truth, and that you are going to present yourself well in court, they may back off. They know that if they are caught in a lie, their whole case will look bad, and you will probably win.
Next, you want to have your car in order, in case you do get pulled over. Don't look like a scumbag. (Sorry.) Don't have pillows, a sleeping bag, or dirty clothes in the back seat. No roach clips lying in the center console, please. And no visible money, either. Look like someone who had a decent place to sleep last night, and will have one again tonight. Don't have a bunch of stuff lying around in the passenger area that just begs to be pawed through.
When the officer starts questioning you, you have some choices to make. Machinist, I strongly disagree with your having said to the officer, "Yeah, kind of, and looking for work." That made you look like a drifter. Not the image you want to present. You want to look like a solid citizen. If you're a professional, maybe slip that smoothly into the conversation. "I just got back from the American Dental Association convention," or whatever. Carry professional identification prominently in your wallet. I actually keep a business card on my dashboard in a visible location, for this and other reasons. Give the officer reason to understand that you're someone not to be toyed with.
I would answer a few basic questions without hesitation, such as my home address, where I've just come from, where I'm headed, if I'm going to meet a friend or family, and the like. Beyond that, you need to decide if you want to answer detailed questions, in the interests of conveying an image of being cooperative, or instead refuse to give further information. I wouldn't lie, because that can lead to all kinds of problems. But personally, I wouldn't agree to tell very much, either. You have no legal obligation to answer questions unrelated to the reason you were pulled over. Certainly you have no legal obligation to say anything that could support bringing any criminal charge against you. Understand that the police have only one reason for asking you questions--to get something to use against you. Anything you say MAY give the police probable cause to search your car, or MAY support a suspicion that you present a threat to their safety, thus giving an excuse for some further search of your car or person, absent probable cause to believe that you have committed a crime. If you do not give them a reason to search your car, it's very possible that they may do so anyway. But if the police subsequently seize your money, without having had a proper excuse for the search, you'll be legally entitled to get it back without any further inquiry into the circumstances of why you had the money. The police should know this. Again, this gives them a disincentive to go ahead with the search, a disincentive to seize any cash, and a disincentive to try to keep it if they do initially seize it.
I would not answer questions, along the lines of, "Are you carrying any firearms or drugs?" which are obvious setups. My own choice would be to say something along the lines of, "That's none of your effing business," although I'd probably rephrase it. I would never answer a direct question as to how much cash I had with me, or any question designed to elicit if I'm carrying money. I would probably respond in a way that expressed that I thought the inquiry was improper, and that implied that I thought it might be a shakedown. Personally, I wouldn't want to come out and say that I'm a professional gambler, because a lot of police have very negative views of such people. Again, the image I would want to convey is that I'm someone who knows my rights, who is not afraid to stand up for them, and who can bring them trouble if they treat me improperly. All without being outright rude or confrontational.
I'm not sure what excuse the police need to bring a drug-sniffing dog, but again, I wouldn't want to give the police any information that might afford them an excuse. It's well known that dogs alert on all kinds of things other than actual illegal drugs, and may be trained to alert on command. It's a common ruse to fabricate a reason for searching your car. Again, police WILL lie on the witness stand, if it comes to that, but would probably prefer to avoid such a situation. If you get caught up in a dragnet operation, the police may well have a dog nearby. Otherwise, it's going to be a hassle for them to bring one around. Why would they do it? It takes a lot of police time and resources, when they really have better things to do. So give them as little reason as possible to go to the trouble. Leave them guessing. If it's pure speculation that you might have a lot of money with you, make them decide if they want to make you the target, or look for greener pastures.
Your goals are to minimize the chances of a big hassle, but to maximize your chances of gitting youself a lawsuit if they do hassle you.
Most importantly, you should think about how you're going to handle these situations BEFORE they happen, because you'll be in no condition to try to figure it out on the fly.
International border crossings are a whole different animal.
Finally--Machinist, you say that the DEA agent actually told you, "We went through your paperwork in your suitcase and my GOD you visit alot of casinos!!!!!! So we are assuming by your all your IRS records, player cards, and strategy cards....you're a professional gambler????" Ummm, I have trouble imaging that they had probable cause to go through all your personal effects with a fine tooth comb, reading all of your paperwork. You may want to speak with a lawyer about the possibility of a civil rights suit.