So, it's a plugin, so it'll be affected by the highlight problem. MyCodes are parsed before the highlight occurs, but plugins run after (in fact, you're hooking right at the end, so it's affected by everything that goes on earlier).
There's not really a nice solution - all the ones I can think of are rather "hacky".
EDIT: you should really take a look at inc/class_parser.php
One of the suggestions I made above is to hack the MyCode cache, eg:
Above is just an idea - you'll need to modify it to suit your needs.
As for wordwrap, it's a weakness in MyBB itself unfortunately: http://community.mybb.com/thread-43152.html