What is it about the mouse that makes it a good user experience?
A mouse is very precise. It is controlled near a keyboard, which allows for quick switching from pointer control to typing, and it utilizes your wrist and arm allowing your fingers of your hand to be free for extra controls.
A mouse gives the user options that other controls don't have. You can use as far as your arm can reach to move the mouse, which allows you to have more inches per pixel than a track pad (Say a track pad is 4 inches across, either more 'resets' of picking up your finger are required compared to a mouse OR each cm needs to move the pointer more pixels making it more difficult to be precise.) Your free fingers also give you access to more buttons than any other device except a joystick, which has issues with precise movements since the cursor doesn't stop until you reset the stick back to neutral.
While a track pad does allow for multi-finger controls, such as two finger drag to scroll the screen, or squeeze/widen to zoom out/in, the mouse can do these as well through the scroll wheel (sometimes requiring a modifier button to be held).
A stylus, such as your finger, is great in that you don't need a flat surface and it is always near you. Further it is easy to learn since it tends to be intuitive at the basic level. However it falls apart as you desire to do more complicated controls. Say you want to hover the mouse over an image to see it's title, for a mouse you just move the pointer, but for a touch screen you need to somehow indicate that you are moving the pointer but NOT clicking or dragging anything. Not being able to easily separate moving the cursor and clicking the cursor makes precision with a stylus to be worse than with a mouse. Some websites/browsers get around this by creating a zoomed in sub window when you click a link near other links so you can make a good selection but it is still an extra step not needed by mice. Further, the stylus method has the built in issue of you obscuring what you are clicking. You typically are looking at what you want to click on, but the act of clicking on it obscures your vision of what you are doing!
Finally there is the trackball, which I find is closest to 'replacing' the mouse. The main difference is that it suffers similar to the track pad in distance per pixel. Depending on the size of the ball, you can only move your thumb so far before you need to pick it up to get more room. At that point you either stop the ball rolling (so movement is choppy) or 'push' it which gives different results depending on the friction of the ball (variable even between the same device on different days depending on how clean your finger is.)
One final question, what would it take to make a computer mouse obsolete?
The only thing that will make a computer mouse 'obsolete' would be direct brain to computer interfaces that are portable and universal.
Until then, stylus's will always have the issue of obscuring what you are looking at. Trackpads will always have a smaller size to screen size ratio than possible arm length to screen size ratio. Joy sticks will always require returning to 'neutral'.
However, if you are performing actions that can be done with only the mouse movement, scroll wheel and left click (browsing the web) on a device that is small enough to be portable then the stylus is perfect and is better than the mouse. You no longer require a flat surface, the complex actions are not being used, 'obscuring' your vision typically only happens when you are changing screens anyway, you always have a stylus with you etc.
If you are performing more complex actions and require frequent typing, or if the screen is not portable or close enough to touch (connected to a projector possibly) but you also don't have a large flat surface for the mouse then a track ball might be best. If you don't want to carry a track ball or learn to get used to them, most laptops have built in track pads that would be the best option.
Currently, there are many ways to control a cursor on a screen. Every one of them has their own advantages or disadvantages in certain circumstances. Even with direct brain to computer interfaces, I could definitely see people not wanting to hook their brain up to a public computer and risk getting a brain virus or something. In which case any current device would be superior since they don't include getting your brain corrupted.