Hi Samuel,
I infer from what you have said that you are new to this and have not yet learnt to write cooperative non blocking code. I am guessing your code is full of delays and possibly while loops waiting for something to happen. I am also guessing you have put quite a bit of work and thought into it and you will find the idea of re-writing it daunting and perhaps frustrating.
There is absolutely no difficulty in writing code that receives the information from the Nextion when the Nextion sends it while continuing to do the other monitoring and controlling you mention, and probably a whole lot more as well, you just need a different approach. This is the point when you start your transition from beginner to experienced programmer.
I am not going to give you custom lessons because there are plenty of examples of what you need on here and in the IDE, you need to learn how they work and incorporate them into your design. You will probably have to start again (sorry!) but what you have done will give you a good idea of what to aim for; you are trying to do the same things, just in a different manner.
Some relevant tutorials:https://forum.arduino.cc/index.php?topic=261445.0https://forum.arduino.cc/index.php?topic=503368.0 https://forum.arduino.cc/index.php?topic=223286.0http://www.thebox.myzen.co.uk/Tutorial/State_Machine.htmlhttps://forum.arduino.cc/index.php?topic=710998.0Also, the sample code in my tutorial
Using Nextion displays with Arduino is entirely non blocking an is in the style you need to learn.
There is also plenty of discussion on this in the forum as this is a common thing beginners have to learn as they try to deal with more complex problems, please do so reading.
Finally, here is a real world example of how I think your code is written now and a hint of how it should be written:You wouldn't expect this when you go into a restaurant:
A waiter meets you at the door, takes you to a table, gives you a menu then waits by your table while you decide what to order. The waiter takes your order, goes to the kitchen and waits there while the chef cooks your food. However, as the staff in this restaurant only ever deal with one customer at a time your waiter has to wait with other waiters while the chef cooks 5 other meals before starting on yours. When the food is eventually ready the waiter brings it to your table then waits by your table while you eat it. When you've finished eating the waiter takes your plates away and returns to ask if you want anything else. This continues until you leave. No one else gets served. This is how your code is working at the moment.
I'm not going to describe what really happens in a restaurant as you already know. A waiter uses exactly the same system as a state machine to serve people when they need serving and check to see who needs serving next between dealing with customers. You can build functions for the different tasks a waiter does such as:
void takeOrder();
void bringFoodToTable();
You call these from loop(); While in loop the waiter checks to see if any tables need attention, and if they do s/he goes to find out what they need. If not, then s/he keeps checking until someone needs something. Computer code should be written along the same principals.
See
Demonstration for several things at the same time for how to implement a state machine in software rather than in a restaurant.
Also look at
Using millis for timing, which is also relevant as frequently millis timing and a state machine are used together.
Good luck!