The only problem I see is subtle, but it's important: Allow no variation in the URL to be rewritten to your script. If someone tacks a trailing slash on the request, then detect that first and 301-redirect to the URL without the trailing slash.
If you do that, then it won't matter, that the parentheses around that slash-pattern are not needed... :)
Otherwise, by allowing your script to be accessed by two different URLs (with trailing slash, and sans), you create duplicate-content vulnerability which can be exploited...
Finally, once you've changed all of your old dynamic links to static links, you'll want to redirect any clients requesting the old dynamic URLs (which are now used only as internal filepaths).
# Externally redirect to remove trailing slash
RewriteRule ^template.php/([0-9]+)/$ http://localhost/template.php/$1 [R=301,L]
#
# Externally redirect direct client requests for old dynamic URLs to static URLs
RewriteCond %{THE_REQUEST} ^[A-Z]+\ /template\.php\?user_id=([0-9]+)\ HTTP/
RewriteRule ^template\.php$ http://localhost/template.php/%1 [R=301,L]
#
# Internally rewrite template.php/<user-id> requests to template.php?user_id=<user-id>
RewriteRule ^template.php/([0-9]+)$ template.php?user_id=$1 [L]
I should also point out that there's no need to link to "/template.php/<user-id>". You could just as well link to "/user/<user-id>" or "/sponsor/<user-id>" or anything else that's shorter, more memorable, more attractive (in your opinion), or all of these. No-one but the bad guys care that the script filetype is probably .php, and there's no reason to publish the fact...
Jim