Which country(s) other than the US were the most problematic / worst? Personally I've had more aggravation at the Canadian border than any European country.
Many countries are worse to deal with than the US at the border during entry. Ironically, most of the worst ones are wealthy / "low corruption" countries, because they have well-paid, interested people at the border, who also don't like having their authority challenged in any way. The UK and Canada are both significantly worse to deal with than the US, probably my worst experience on entry though was Australia. IMO, the Australian government is maliciously incompetent at every level /and/ at the same time fastidiously aligned to their maliciously incompetent policies. A lot of folks in the West don't realize that Australia is closer to China than the US when it comes to digital freedom and privacy.
All the less-wealthy and "more corrupt" places I've traveled were far easier to deal with at the border. It's happened so many times I've lost count that the border agent didn't even look at me /or/ my passport before stamping a random page and yelling "Next". This doesn't happen in countries where the person at the border is well-paid and engaged in their job, it happens when they are bored, disinterested, and just want to go home. With one exception, all my worst border experiences were in wealthy countries. The one exception I won't discuss in detail publicly, but it was while leaving, not arriving, and at any rate wasn't due to their border agency but rather their secret police mistaking me for a journalist.
Another observation I have is that only foreigners really get the worst treatment, so this may be why I haven't felt so badly about the US CBP, while I hear from my non-American friends and acquaintances that the US is the worst one to deal with. I'm sure any citizens of the countries I've mentioned will be quick to defend them in the comments in reply. After all, when you're a citizen, it's generally pretty painless to get back into the country of your citizenship. As a foreigner you face more scrutiny and have less legal protections.
I'm Canadian and lived in the US for 5 years and crossed back and forth at least once a month.
I agree, Canada's border crossing is worse.
I've crossed the US with underage children without their mother present several times.
US customs hauled the kids out of the car and took them to a secure location and asked them where they are going, if their mother knows where they are, etc.
This makes perfect sense and I'm glad the US customs officers took the time to do this. They are doing their job, preventing child abductions, etc and it was outstanding to see it being done.
Entering Canada it seems they only care about one thing : What do you have they can tax you on.
I wont be surprised to see the day when Canada measures how much gas is in your car, and if it exceeds an arbitrary amount tax you on this too.