If you are not allowed your gadget onto the plane, what will the immigration droid clone, purloin, copy from?
It will be done during luggage handling (by someone who has most likely the original TSA keys rather than 3D printed ones off the Internet) where you cannot see that they will add data to your laptop, so a later arrest for possession of CP will be more of a surprise to you than to the arresting officers (in case of entrapment) or they don't need to copy your date because you'll do that yourself (in the case of spyware, which is also MUCH quicker to do than copying the full data set).
Bonus issue: this ban doesn't actually work. All it does is raise the profit for airlines because they will sell two tickets. One leaving for an airport in a country without a ban, and one to travel from there to the US.