Should have been rated A.
M is more for gratuitous violence kind of stuff or sexual innuendo stuff at most.
A is more gratuitous nudity stuff or if it contains both.
Yeah there's a fine line but some dude jerking off for huge portions of the animation, with closeups on his jerking off, quite clearly places this in A territory.
Fine line territory would have been more like hint or innuendo type stuff, like if you'd just left the bulge in his pants and he wasn't stroking it but was clearly getting aroused by the other two dudes hugging. But you didn't leave it at that.
If you'd rated this A I would have voted this much higher.