I spent about $9,000 on Amazon across 139 orders in 2018. I buy a lot on Amazon. I've never had a problem with receiving knockoff products. I don't understand how this can be such a prevalent issue when I've not run into it, given how much I use Amazon.
The only thing I can think is that, if I'm buying something expensive, I'll strictly only purchase items "Sold by: Amazon.com Services, Inc" or alternatively, I'll use a marketplace seller if the seller is the manufacturer of the item I'm buying.
If you are trying to avoid counterfeits, that's not really helpful, since the problem with counterfeits is magnified by commingling, by which items sold by Amazon itself, and FBA sellers that do not opt-out of it are mixed and orders fulfilled with goods that may have been sourced by any of the sellers.
Most users don't think to check for that, though. I know my mother-in-law doesn't...
But I still buy laptops and other electronics from Amazon.