It seems like this is an X-Y problem. The reported issue is that the Arduino IDE is saying 91% of program storage space is used. The real issue is that the program isn't working as expected, which has absolutely nothing to do with the amount of program storage space. So why don't you provide details about what the real problem is?