This took me several tries and I finally got it done with the Ironclad, but any class should work. RNG is a huge factor since you need enough events to remove cards plus you need to be able to assemble a five card deck that's good enough to complete the game.
This was the results screen from my successful run:
You want to hit as many ? rooms and merchants as possible, hoping that ? rooms give you the option to remove cards and that you have enough gold to buy the card removal service from the merchant.
Some notes on my run:
I took an early Carnage
thinking it would be strong at the end, but it turned out to not be a good choice and I was lucky that I was able to remove it and still get down to 5 total cards.
I got Pandora's Box from the Act 1 boss which I used to transform all Blocks and Strikes (I had six left at this point) into Shrug it Off, Dual Wield, Clash, Metallicize, Anger, and Inflame. An event then transformed Metallicize into Brutality.
I ended up adding three cards directly: Carnage, Shrug it Off, and Flex.
I ended up removing eight cards: Defend, Strike, Defend, Brutality, Anger, Inflame, Carnage, and Flex.
Carnage was a big help early. I removed it in Act 3 at an event that gave me the option to remove it specifically, so that was lucky as it would have been terrible against the Act 3 boss.
You start with 10 cards so you need a net loss of five to end up with five or less. I added three, then removed eight (which was pretty lucky since most runs have far fewer removal events). Two of the eight that I removed were cards I added directly.
I probably would have been better off with Flex than with Bash. I could never play Bash and Carnage together since I only had three energy for most of the run.
You need some luck with Relics, too. I had two that were particularly helpful: one that reduced vendor prices 20% (from a ? floor) and one that gave me an extra energy each turn (from the Act 2 boss). With only three energy, I don't think I could have completed the game.
Here's my Act 3 boss battle:
I could have killed the boss before he recharged if I used the Energy Potion to play Bash on turn 1, but I still was able to beat him (with the help of other potions).
Good luck. You'll need it.