Ways to change item appearance(model) based on a scoreboard(individually for each player)?

For context: I'm making a plantsvszombies datapack, and there are a group of custom items that represents different cards of a plant. The different items in that group are all handled by one system (one group of functions), instead of each having an individual function group. Also each plant have different sun cost. I want the items to change it's appearance to a black out no sun model when the player's sun scoreboard drops below this plant's cost and return to normal appearance if the sun is above this plant's sun cost. Only appearance change is needed since usage side of things' detection of having enough sun can be done when player is holding them in hand/offhand.

I've already implemented the appearance change, but through a very performance heavy way: Iterating through the player's entire inventory once for every type of plants on change of sun and item modify them. However not only is iterating through player's inventory costly performance-wise, the cost will scale with the number of types of the plants, making the cost too heavy even if only checking them when sun changes(and receiving new cards).

I considered storing the plant's sun cost in the item's custom_data and when checking for appearance changes, item modifying the custom_model_data when the sun is greater or less than the sun cost of the plant. That way each time sun changes, only one iteration of the player's inventory is needed, as long as I keep the same rule for all the plant card's item definition(in resource pack)'s handling of custom_model_data the same.

Is there any suggestions on better ways of doing this?

Continue to help post