Been there, done that rofl.
When I made my first infopanel I came across a problem and it refused to load. Realised it was due to numbering the same as an infopanel I already used.
So I went through all the current infopanels and listed them. Grabbed a number considerably higher than what had been used so far and started from there.
The link is in my signature so you can take a look at what I've done so far
That said, yes, it would be a good idea to have a function to do just that as part of the infopanel system.