Just came back in through Haneda the other night - first time doing customs there as I usually fly through Narita.
Think I got lucky because it was SUPER smooth. Took the slip and waved me right through.
In my (limited) experience this seems to help smooth things out -
1) As much as possible always use actual luggage. I'm not above traveling with some stuff in cardboard boxes if I have to but stuff like that seems to have a much higher potential for getting checked.
2) I'm usually traveling together with several Japanese people for work. If you have more than one suitcase try to have a Japanese friend take the extra one through for you. I don't think I've ever been stopped when I had just one suitcase but an overabundance of luggage seems to work against you.
3) Fill out your customs form in English and speak only English to the customs agent, no matter how good your Japanese is. I've had far fewer checks since I started doing this - I think it seems like more of a hassle so they just let you through.
I've never had any real issues even when my stuff was checked but its always easier to just avoid it if at all possible.
But even with a perfect strategy sometimes the law of averages works against you and you'll have to let them rummage through your stuff.
Glad it didn't happen this time, though - wasn't bringing anything illegal across (at least that I know of) but also had a few things I picked up at a natural history shop in Europe that I wouldn't relish explaining.