Creating SMS Gateway (Relay) with AI2 Possible?

Running an App inventor application in the background is still not possible.

Perhaps. This thread indicates there are issues The application has stopped receiving text messages in the background.

An old tutorial called Broadcast Hub describes an app similar to what you expect to build. That tutorial is out of date . This discussion indicates what you might be able to do Broadcast hub (solved) to get Broadcast Hub to work.

Can you "pass it onto an online server over internet via a web service?" -- experiment and you can tell us. I do not know. What is possible depends on your coding skills and how your cell phone service supplier ques Text messages. Option 3 may or may not work for you.

Regards,
Steve