I agree with the comment that rebooting the server is NOT the correct way to handle heap usage.
Memory is meant to be used, it's not meant to just sit there incase you need it.
Java 17 (NetOps 23.3.8+) tends to use more memory at once so that GC is kept low. If memory does get too high, a longer GC may be needed to reclaim memory that the application is asking for. But it could also mean that the scale of the system has increased to a level that may need more memory to more efficiently. G1GC used in Java 17 is auto-tuning based on memory usage. So each environment is different in terms of polled items, device count/types, how much thresholding, or rollups it does. So there really isn't a magic number to remain under.
You need to watch the application pause times in DA/DC self monitoring dashboards. once those start getting over 3-4 secs per minute, maybe consider adding memory after checking if scale is increasing. That doesn't mean just item count, but how much thresholding, how many groups you define in Portal, etc...