Your application requires running a server, which presumes constant availability, connectivity and unrestricted processing power. A mobile phone provides none of these.
Mobile phones are designed to conserve battery life by minimising processing and power demands. These two points are directly at odds with running a server.
But it requires stability, in the sense of not having random crashes or down time.
Assuming your software is correctly written, you may not have to worry about crashes, but the OS will be constantly trying to put the system to sleep.
- Run a web server that could execute CGI scripts (vanilla CGI)
- Respond to SMSs
- Handle an SQlite database
- Do so in Python (as porting it to Java is not feasible due to time constraints)
Why not just use a small virtual server? You can easily purchase a server for as little as $5 a month (e.g. DigitalOcean) and use Twilio as an SMS gateway (a few cents per SMS). Cheap, available, reliable and highly available. You get a preinstalled Ubuntu image, install a few extra packages on there and away you go with Python and SQLite. And you don't have to worry at all about the mobile/SMS side of things (signal strength, network availability, etc). All these points above would be satisfied by this solution.
If you don't want to operate a server externally (ie. "in the cloud") then you could use an old PC and install Linux. Or even use a plug computer and have an almost invisible server. There are so many hardware options that are more suitable than a mobile phone.
For various reasons, running this on an Android phone would resolve some problems with the existing setup.
How? What is it about Android that makes it preferable? If you're referring to the laptop battery problem, the phone would suffer a similar (if not worse) fate.
In short, would such a system be stable? Assuming the core program is sound, could I rely on it?
You will probably be fighting the OS and the hardware the whole time. A server wants to be running constantly, a mobile phone wants to be running as little as possible. The entire stack of hardware and software is optimised for power conservation. A mobile is designed to run from a battery with intermittent charging, and its thermal management systems are designed to wake the CPU as infrequently as possible. If you try to run a mobile as a server, you will likely wear out the hardware very quickly. They are simply not designed to run 24/7. You could run such a system, and it would probably work for a while, but I expect you would have to replace the hardware before too long.
Use hardware suited to the task of running a server. Old PCs are so easy to come by these days, it should be possible to get one for free that would be up to the task.
Also, is CGI really a requirement? You should really look at WSGI; it is far more efficient. CherryPi is a nice Python server, and Flask is definitely worth a look too.