For what you want I’d get a better brake. For budget builds, kids and hybrids etc the M2 is a decent enough brake. On the front of a proper mtb with decent spec I’d want something a bit nicer and more powerful.
The popular cheap shimano brake at the moment is the mt501 – although I think there is also now a new deore level 4 pot brake in the new groupset that I assume is largely the same.
Im not a huge fan of shimano brakes but there’s no faulting the power. My road bike with 785 / 505 calipers on it will stoppie in dry weather whilst you’re still seated.