1. Never give a law enforcement officer verbal (or certainly written!) consent to search your person or your property. Make them get a warrant. If they threaten something like "We can take you to jail or we can clear this up right here if you give us consent to search" then let them take you to jail.
2. Never volunteer information to law enforcement or answer their questions (beyond what's required by law, e.g. identifying yourself in some jurisdictions) unless your lawyer is present.
3. Never have marijuana in your car if you're driving across a border from a state where it's legal to a state where it isn't. State troopers sit at those borders and look for any excuse to pull you over because it's an easy win for them.
4. Be careful in eastern Oregon because while it's not densely populated, it's still very Red. They have to follow state law w.r.t. marijuana but that doesn't mean they won't try to find creative ways to screw you over. The most surprising thing to me about this case is that most of the malfeasance was on the Oregon side rather than the Idaho side.