I want to create composite gadget device with Raspberry Pi Zero W, and use power and data in the same USB port on another, host, machine. I am worried about it being unplugged while things are written to the SD card (my family is kinda nasty, and not tech-oriented, so they might do that when I'm not around).
I thought of a solution like this: Having a splitted USB cables with one plug having only data lines and other only power lines then solder the data lines to USB "gadget-enabled" connector and power to little power bank and then from powerbank to power connector thus charging it while connected to USB.
This solution is not ideal. It will make whole device heavy, so I am asking for some advice from the community.
PS: English is not my native language.