Well if it's illegal for the President to declare martial law then it doesn't matter his reasons, because it's illegal. To answer your question one instance where the President can declare martial law is rebellion. So if the goal of the Oath Keepers, or whoever, was to trick Trump into declaring martial law (which he didn't, but legally could) then it wasn't really an insurrection. It was a riot masquerading as an insurrection. The purpose of insurrection is to overthrow the government, but that wouldn't have been the purpose here. Trump couldn't be engaging in insurrection because he can legally declare martial law. In fact, he could have done so even if this was a riot, not an insurrection.
Let's look at what insurrection is, by law.
1999 US Code :: Title 18 - CRIMES AND CRIMINAL PROCEDURE :: PART I - CRIMES :: CHAPTER 115 - TREASON, SEDITION, AND SUBVERSIVE ACTIVITIES :: Sec. 2383 - Rebellion or insurrection
Whoever incites, sets on foot, assists, or engages in any rebellion or insurrection against the authority of the United States or the laws thereof, or gives aid or comfort thereto, shall be fined under this title or imprisoned not more than ten years, or both; and shall be incapable of holding any office under the United States.
By your own accounting this was not a rebellion against the authority of the United States. It was a trick to get Trump to use his legal authority to declare martial law, which, by the way, does not include the power to ignore election results or declare a new election. Trump's authority would be to use the military to suppress the riot/fake insurrection.