Thanos was holding back against Cap in Infinity War. Thanos won the Infinity War as soon as Odin died and he was free to make a move without fear of Odin stepping in and crushing him. He took the Power Stone from Xandar using the force of his army, and then everything after that was him taking a victory lap. Thanos went toe-to-toe with the Hulk and sent Hulk running away in terror, and he didn't even need to activate the Power Stone to do it, because he was holding back and having fun, because his win was already complete and everything from here on out was too easy.
Thanos was like "I'm gonna push you down now Cap" and Cap's like "No way!" And Thanos is like "Damn, you're really giving this everything you've got, aren't you. This is great. I like the fire in your eyes. I hope you survive what I'm about to do."
The only time Thanos was fighting serious in Infinity War was when he saw a godkiller axe hurtling towards his chest. Thanos 2.0 was more serious in Endgame, but Cap had a god-hammer.
Raimi Spiderman has to have been holding back against Doc Ock. Raimi Spiderman can punch through brick, and Doc Ock is just an old man with zero defensive ability in his face. Those punches can't be a measure of Raimi Spiderman's power.
They can be a measure of how Raimi Spiderman fights though. He's not going to immediately be trying to punch Cap's head off, that's for certain.
IMO, many of Cap's feats are based around his Vibranium shield. Like when jumping out of that building, Cap went shield-first. The shield absorbs and deflects massive amounts of power (to the point where even Thor trying to smash it with his god-hammer was mostly ineffective). But that shield is a very bad matchup against Raimi Spiderman's train-stopping webs. The shield could absolutely stop a full-power Raimi Spiderman punch, but one shot of sticky web and that shield is taken out of the equation.
Cap is absolutely a better fighter than Raimi Spiderman, but I would say that Raimi Spiderman is faster, stronger, more durable, and he has a huge weapons advantage. I can't see Raimi Spiderman losing this fight.
If we give Cap Thor's hammer, then that changes things, a lot. Like, if Cap knocked Raimi Spiderman down with the hammer, Cap could put the hammer down on his chest, and Raimi Spiderman would be beaten. But Raimi Spiderman's Spidey Sense suggests to me that Raimi Spiderman could last in a fight against Cap with the hammer, at least for a while. If Raimi Spiderman can dodge a car coming at him from his blind spot, he can dodge the hammer (although the hammer would be faster and more destructive than a mere car). Webs won't stop Thor's hammer. If Cap has the hammer, then that's a real fight, and I could see it going either way.