Common advice: "Don't reinvent TCP because TCP is very hard to do right. Use an existing stack which has been optimized during decades of experience"
So far so good, until someone advices:
"Get a Wiznet chip, it's a TCP/IP on chip solution so that you don't need to reinvent TCP because it's hard"
Fast forward to many thousands of units on the field, and you are now debugging TCP issues, the exact thing you wanted to avoid, except that you can't do anything about them. You can't fix the stack. It's locked in silicon.
It does not have exponential back-off retransmission. It doesn't have RTT measurement, Karn's algorithm, no congestion window. It's the bare minimum TCP implementation, which works on a good network. It's exactly what you would get if you implemented your own from scratch with limited time/budget. Except unfixable.
Add a slow 2G link, and it fails. Add a Chinese poorly tested WiFi extender, and it fails. Only the Wiznet fails. Computers and phones on the same networks do not, because they run Windows (BSD) or linux stack; the Chinese tested with those.
I have given the "use Wiznet chip" advice before here, so I have to apologize. It's bad advice. Avoid.
Compared to Wiznet lock-in, actually even writing your own TCP stack (the thing which you should never do) would have been better - that would be fixable. Of course, the best option is to use some actually tuned and tested stack, and run that on the microcontroller, and if necessary, using a bigger controller (with MAC peripheral) to fit it.