EtherneT-shield and ram usage

Hey Guys,
im working on this Project, i have a mpu6050-sensor-breakoutboard and i want to send the data via an ethernetshield to touchdesigner where it is processed further. As i need it to be very small (and cheap), i decided to use an nano with an enc28j60-shield.
I wanted to use the UIPEthernet Libary, as it easy to use for me, but the ram usage is very high and my arduino now complains about stability issues.
I only need to send udp-messeges to the pc, is there any way to reduce the load of the libary? or any other ideas for transfering the data? (In the end there will be 50 sensors, with 50 nanos, all sending data to touchdesigner, and also touchdesigner will be sending data to the nanos, which will control each one led with an ws2812-ic.)

#include <MPU6050_tockn.h>
#include <Wire.h>
#include <UIPEthernet.h>
#include <FastLED.h>

//#include <EthernetUdp.h>

byte mac[] = {
  0x01, 0x00, 0x5e, 0x00, 0x00, 0xfc
};

IPAddress ip(192, 168, 0, 18);

#define IP "192.168.0.17"

unsigned int localPort = 8888;      // local port to listen on

EthernetUDP Udp;
MPU6050 mpu6050(Wire);

void setup() {
  Wire.begin();
  mpu6050.begin();
  mpu6050.calcGyroOffsets(true);
  Ethernet.begin(mac, ip);
  Udp.begin(localPort);
}

void loop() {
  mpu6050.update();
  Udp.beginPacket(IP, 8888);
  Udp.print("+");
  Udp.print(mpu6050.getTemp());
  Udp.print("+");
  Udp.print(mpu6050.getAngleX());
  Udp.print("+");
  Udp.print(mpu6050.getAngleY());
  Udp.print("+");
  Udp.print(mpu6050.getAngleZ());
  Udp.print("+");
  Udp.print(mpu6050.getAccX());
  Udp.print("+");
  Udp.print(mpu6050.getAccY());
  Udp.print("+");
  Udp.print(mpu6050.getAccZ());
  //  Udp.print("+");
  //  Udp.print(mpu6050.getGyroAngleX());
  //  Udp.print("+");
  //  Udp.print(mpu6050.getGyroAngleY());
  //  Udp.print("+");
  //  Udp.print(mpu6050.getGyroAngleZ());
  //  Udp.print("+");
  //  Udp.print(mpu6050.getGyroX());
  //  Udp.print("+");
  //  Udp.print(mpu6050.getGyroY());
  //  Udp.print("+");
  //  Udp.print(mpu6050.getGyroZ());
  Udp.endPacket();
  delay(10);
}

using an ESP-8266EX like the Lolin / Wemos D1 mini would be cheap (about $3.50 each), include WiFi (instead of Ethernet so no need to pay for that and all the wiring) and have lots more memory.

Do you really need this to be wired to Ethernet ?

Never thought of an other microcontroller actually, but as the installation will be quit big, mayby 25*25m or something, i kind of got worry about using wifi

Using one of the Wiznet Ethernet controller chips (W5100, W5200, W5500) instead of the ENC28J60 will significantly reduce your memory usage. The Wiznet chips have a TCP/IP stack built into the chip whereas the ENC28J60 does not and so that must be provided by the UIPEthernet library.

You can get this W5100 shield for the Nano for just under $12:
https://www.ebay.com/i/401088548083

juliusb:
Never thought of an other microcontroller actually, but as the installation will be quit big, mayby 25*25m or something, i kind of got worry about using wifi

If you put a good WiFi access point in the middle (not a small ESP) of your area and you don’t have obstacles (water, metal walls, ...) that will be no problem