You do need a rewritecond to prevent an infinite loop if DirectoryIndex is set (as is customary) to include index.php. Otherwise, your rule redirects "/index.php" to "/", then DirectoryIndex rewrites "/" back to "/index.php", then the rule matches again and redirects back to "/". Lather, rinse, repeat...
So this application calls for the bog-standard "redirect /index.xyz to / without looping" rule with only a small tweak to accommodate the additional path-info optionally appended to "/index.php". This isn't so much a "rule" question, as it is a "regular-expressions" question...
RewriteCond %{THE_REQUEST} ^[A-Z]+\ /index\.php(/[^\ ]*)?\ HTTP/
RewriteRule ^index\.php(/(.*))?$ http://www.example.com/$2 [R=301,L]
Note that since the slash following "index.php" is part of an optional subpattern, this rule works for both cases, so two rules are not required.
Also, because of the nested subpattern construct used in the rule, the top-level slash is always 'forced' in the target URL even if no additional path-info is appended, e.g. example.com/index.php --301--> example.com/
Jim