what usually works sufficiently well for me with minimal casualties is holding everyone back, let the ram do its job, make a group with 15 or so melees and set them on f6 so they attack the inner wall since destroying it alone takes a while and after its down let everyone move in. the majority will attack through the gate and not try using ladders or siege towers where they will get killed easily by the defenders. plus the defending force behind the gate just stands there doing nothing, or atleast only the frontline attackaing here and there, mostly not though bc they are so tightly packed that they cant swing.