Maximum number of pins/lands/balls on an IC package?
The largest I'm aware of at the moment is LGA2011 so I wouldn't recommend dropping your 4096 pin limit to cover the near future as it's already close to the next nearest lower power of two of 2048. I would however recommend looking at your data structures and limits to make them dynamic, if performance and memory use are a problem I assume you're using some static data structures that will waste a lot of space for two pin devices?

Instead maybe allow for a 32-bit number in the metadata (only a few extra bytes) so that if packages of greater density arrive in the future they will be covered. If you're trying to store data in a relational database or similar and currently have 4096 columns it should be normalised and store each pin description in a seperate table.