I'm an Alaska (relatively) frequent flyer. That airline offers a free "messaging" plan, that lets you send and receive messages on apps like iMessage, Facebook Messenger and Whatsapp. Though, it somehow prevents images/attachments from coming through on those platforms.

I've always wondered how this is implemented technically, and if it might be possible to setup some kind of protocol/wrapper to send data that looks like it's being sent over those protocols, but offers access to other parts of the internet.

You could try iodine, which is an IP-over-DNS tunnel. This should work unless the gateway has very restrictive rules on where DNS traffic can go.

https://github.com/yarrick/iodine