I know how to solve it, but with a mod. Anim files for mounted rifleman, both horse and rider, do not have animation for Trample Attack: You just need add this:
mounted_rifleman_horse.XML
<anim>Attack_trample<assetreference type="GrannyAnim">
<file>animation_library\cavalry\horse_trample_A</file>
<weight>40</weight>
<tag type="Attack">0.57</tag>
<tag type="SpecificSoundSet" checkvisible="1" set="Swoosh">0.46</tag>
</assetreference>
<assetreference type="GrannyAnim">
<file>animation_library\cavalry\horse_trample_B</file>
<weight>40</weight>
<tag type="Attack">0.47</tag>
<tag type="SpecificSoundSet" checkvisible="1" set="Swoosh">0.41</tag>
</assetreference>
<component>ModelComp</component>
</anim>
mounted_rifleman_rider.XML
<anim>Attack_trample<assetreference type="GrannyAnim">
<file>animation_library\cavalry\sword_trample attackA</file>
<weight>40</weight>
</assetreference>
<assetreference type="GrannyAnim">
<file>animation_library\cavalry\sword_trample attackB</file>
<weight>40</weight>
</assetreference>
<component>ModelComp</component>
<attach a="sword" frombone="bone_sword" tobone="Bip01 Prop1" syncanims="0"/>
</anim>
somewhere between animations. Those codes are copied from Harquebusier anims, who uses musketheavycavalry.tactics, like Mounted Rifleman