We had to raise the threshold and floor of one of our stalls to eliminate flooding in heavy rains.
On the outside, I put down rock base and screenings on top making a ‘ramp’. Tamped it all down. Then put a stall mat on top to keep hooves and overflow from gutter from wearing it away. Mat extends about 6" further out from the barn than the ‘ramp’. Hubs did pound in a small rod at the top of each side of the mat to help keep it from sliding down the ramp (rod was pounded down until it was flush with the mat so horse won’t step on/trip over it).
This is our end stall so I keep a small trench open to keep water moving around to the side of the barn and away. Has been this way for about 6 years now with no issue.