I am not familiar with OGRE, but I can offer some ideas. The first one would be to actually bypass the armature altogether, and bake the animation to the mesh using shapekeys. This video demonstrates how to do that.
If you need the armature, you could try using this normalization script I wrote. It doesn’t allow you to edit the bone groups per se, but it does make it quick and easy to manage the weights.
You could even write a new script using some of the code and functions from the normalization script. The script just needs to get a list of the influences of each vert, then check to see if there are more than 4 influences. If there are more than 4, it finds the 4 with the highest weight values and then removes the rest.
You may also want to check out some of the other rigging scripts available for more ideas.
Hope that helps!