Combat is mainly about numbers, but smaller numbers can beat larger numbers in the right situations. It is not worth fighting the HRE when you are small, but eventually in most of my games I decide its time to conquer and take over the HRE (how else could I conquer the whole map). This usually happens when I have at least 1000 holdings (i.e. I am two to three times the size of the HRE), but I shall cover some basics for fighting with a smaller army.
1. Troop type. Heavy cavalry can beat out armies 4 times their size made up of light infantry, perhaps more. Nothing beats the Greek Cataphract retinue (300 heavy cavalry, 200 horse archer), but some of the other retinue specialities are fairly powerful too. 20k in cataphract retinues can usually beat out most solid army compositions of twice their size. The problem is by the time you get 20k of them, you have the potential to have a 100k+ in levies. Other troop types like heavy infantry, pikemen, etc are also solid choices. Basically, light infantry sucks and the better troop types will crush them. Fortresses tend to make the better troop types, but it is not always best to stack fortresses (cities give more income and stacking cities can let you hire mercs extensively till retinues get big enough to not really need levies).
2. Generals: Good generals with high martial skill and good traits can make all the difference. Traits like brave, patient, etc can make a big difference in battle, so can martial skill. Good generals for all three flanks and balanced flanks are critical. Losing a flank due to unbalanced flanks can result in an easy loss.
3. Terrain: Terrain is often ignored, but in even fights they make a difference.
4. Tech: Tech levels make a small difference. Due to tech penalties when ahead, this is not always a big difference (I don't focus on it). But tech boosts like the special cultural retinue boosts can be useful when picking retinue types.
Nothing is going to help you beat the HRE as Denmark until you get bigger. Beating the HRE with 3/4th of the HREs size is very possible. But not as a small Kingdom like Denmark unless you grow first. I usually make allies in the early game to avoid issues with the HRE if I play near them. At the end of the day, size is king unless you make alliances and your allies help you. Smaller armies can beat bigger armies, but getting a 20k army of cataphract retinues takes a much bigger Kingdom than than just 80k in pure levies. If you want to win with a smaller army size, you can't unless you game the AI (take a boat, move around and conquer land and avoid the AIs army...if you have a reasonable army size so you can siege all enemy territories, you can sometimes beat the AI with a much smaller army.