That jumping connection is almost certainly related to how the Pico manages the network stack under heavy load. If you are using MicroPython for this type of continuous, high-frequency data logging, especially involving HTTPS, you're likely hitting a resource bottleneck. While the Pico W is tiny and low power, it is fundamentally designed differently than the Raspberry Pi 4; the Pi runs a full Linux OS with dedicated memory and CPU power just to manage its own background processes, making sustained data transmission very robust. When you push a microcontroller to handle cloud API calls and continuous network traffic without that underlying OS buffer, things get jittery.
To get reliable uptime with a Pico, you really need to handle the network stack at a lower level. MicroPython might abstract things away, but that abstraction often doesn't scale well when multiple devices or heavy data loads are involved. Many people who have successfully replaced a full single-board computer on similar projects end up moving to C++ and managing the network protocol directly. This gives you full control over memory and allows you to tune the underlying TLS implementation, like mbedTLS, for maximum efficiency.
One reason MicroPython often struggles with high-performance networking is that the garbage collection and interpretation overhead interferes with the network buffer handling. If your logging routine is triggering large memory allocations or takes too long to complete, the network driver gets stalled, causing those frequent drops and connection resets you're seeing. Moving to C++ lets you preallocate all necessary buffers and handle the network lifecycle much more predictably.
If you don't want to rewrite everything in C++, you should look into libraries specifically designed for robust IoT connectivity that run efficiently on the RP2040 chip, minimizing the time the network stack spends in an unmanaged state. Simply sending bursts of data via MicroPython is often the wrong approach; managing the connection lifecycle carefully is what guarantees stability.