While I agree overall the stock market does not have that much to do with the President notwithstanding Trump taking credit for any market surge under his administration there is one index which Trump uniquely improved just for being Trump: NFIB small business optimism index
As soon as Trump was elected the index surged from 94.9 to 105.8 (in late 2016) a level only matched in the 2003-2005 period. It then went on to rise to a record high of 108.8 in 2018. As soon as Trump was defeated in 2020 the index slumped from 104.0 to 95.9. One can most likely attribute rising economic activity for small businesses to Trump being Trump which is fairly unique in recent economic history.
I've always attributed this to small business owners, especially the ones included in this survey, being a conservative group. Remember, NFIB is the group with its name on the Supreme Court case that nearly overturned Obamacare. In 2010, all 25 of its Congressional members were Republicans and the survey is drawn only from NFIB members. Thus it does not represent small business owners as a whole. There's no other explanation for the persistently low ratings during the Obama recovery, as well as the sudden and dramatic election-based shifts that you noted.
Except for if you look at the index in 1980-1981 and 2000-2001 you find that
a) Oct 1980 to Jan 1981 saw a drop from 97.0 to 95.9
b) Oct 2000 to Jan 2001 saw a drop from 99.3 to 96.4
To be fair in 1980 the USA was in a minor economic slowdown and by late 2000 the late 1990s boom was clearly petering out. But if this group of small business owners are motivated by a Right wing victory in elections should have saw at least a small uptick in confidence in the elections of Reagan and Bush II from the Dems.
It is a fact that small business owners lean Right. But there is something unique about Trump and Trump being Trump that really motivated small business owners and most likely spur their economic activity. Trump will go down in history for being able to motivate a segment of the economy for just being himself and not by any particular economic agenda. Truly unique.