in theory, yes. in practice, no. largely because merchants pay a fee to process credit card transactions which normally exceeds the cash back you can get.
i tried this with square, since their vendor fee was 2.75%, and i got 5% back on restaurants. however, even though i registered with square as a restaurant, transactions were categorized as "other services" or something, so i only got 1% back and lost 1.75% net.
moreover, if you did find a card/processor combination that left you with a net gain, they would eventually catch on and charge you with some sort of fraud. i wasn't worried about it with the square experiment because it was only 1$, but if you tried to do this with large sums, a human would catch you. and if it was enough money to matter, there would be a lawsuit. if you were really unlucky, you might get charged with some terrorism crap like "structuring" deposits.