I am trying to install the same stem but the brake cables and the shifting cable housings are so stiff that I can't get the stem over. How did you do that?
Brute force

Of course without the cables in.
With one hand I kept the housings folded down as much as I could, then I installed the stem and pushed it down as low as it would go. Once I could get it close enough it used the small screw below the last spacer to bring the stem further down, and then I tightened the top cap screw to bring it all the way down.
Once the housings take the initial bend it gets easier, then it's a matter of pushing through expecially the brake cables. For the front brake I had to open the way from the caliper end with a shifter cable first, only then I was able to push the brake cable through the bend at the stem.
Be aware that by mistake I folded the small lip inside the last spacer, the one that divides the housings between left and right side. Avoid that as there's not enough height to have it below a cable, I had to remove the stem to lift it and then install it again.