I've never actually had to dig that deep into the internals of cygwin, but you do need to understand how things are linked if you are going to distribute binaries.
Over time I found msys2 to be a better fit. In theory they're supposed to do different things, but msys2 with no cross compilation is basically cygwin but with a package manager you can use from the command line.
You can use Windows versions of development tools (Java, Python, Node, etc) and you mix them with Cygwin. It's a bit of an unholy alliance but you can definitely develop a ton of stuff like this, I've done it for a decade.
You just need to figure out a bit of Cygwin-fu with cygpath & related tools, to smooth over the sharp areas occasionally.