I think it's a little of both, and I think Trump can only punch down. Four very recent examples:
Mamdani's appearance at the White House. He confidently went into Trump's space and didn't cower, didn't grovel, and Trump can't punch back in those circumstances. Trump clearly still thinks about NYC, and damned if he wasn't in love with its new mayor. He was even asked about his comments about Trump being a fascist, and Trump defended him/changed the subject.
South Park. Trump has constantly gone after broadcast networks to get late-night hosts canceled, because he had leverage over those networks and their licenses. Matt and Trey give no fucks and literally got paid "FUCK YOU" money and are now basically untouchable and are just fucking merciless, mocking his dick size, even doing some live-action bits making fun of him and his dick size, mocking how much of a piece of shit he is, how incompetent he is, how wrapped up in TikTok or twitter his underlings are, etc. Just showing no mercy. The White House issued a tepid response and then backed off, probably out of fear of more of MAGA seeing it.
Governor Newsom. He has flipped Trump's attacks and his fake awards around and is just pounding away using Trump's wording and style, constantly mocking Trump's actions. You'd think Trump would be sending in the National Guard to more CA cities to try and put Newsom in his place, but given the previous deployment was mocked, plus he's been embarrassed to see Newsom use his own words and attitude against him, he's mostly leaving Newscum alone.
Mark Kelly. Trump and Hegseth threatened him, claimed he was seditious and Kelly challenged them head on. As TwiceHorn said, Hegseth probably talked to a real lawyer, plus he was being clowned for not realizing the photo was in a mirror. Trump probably recognized at some point that Kelly was looking for a fight all the while Kelly's stature was being elevated. Oh, and Trump probably didn't realize what had happened with the second strike stuff until after he went after Kelly.
You are 100% right, he doesn't feel like a coward when he sees clear weakness.
And he doesn't understand Ukraine because Trump has never been the underdog - he was born on third base and thinks he hit a triple. In his world, the one with the most resources/money should automatically win.