The Espressif microcontrollers have inbuilt SHA encryption. In the arduino workbench you can install the library to use the encryption to encrypt your text messages. All servers have libraries to decrypt the message. This way you have total control over the message content. The ESP32 series also allow encryption of the firmware you write, making reverse engineering almost impossible. Personally I prefer the ESP32 dual core family of processors, as they run the wifi on the second processor, leaving the second core available for the application without risk of de-stabilising the wifi. When using the single core, much care must be taken to avoid functions like delay() and Serial.write...() that effectively holds the processor, possibly causing wifi events to be missed. For most of what you want to do there are examples on the web. Google is your friend.
As an aside: I used to be a big fan of microchip processors, but these Espressif processors are far superior to Microchip and Arduino and on top of it they are VERY affordable as development boards or modules(which include onboard antenna) OR bare chips. Many also have an IPEX connector to connect an external antenna to improve wifi range.
As far as storing the data in MYSQL, I would suggest using PHP as it provides a simple interface to execute SQL statements and do the important error handling. As suggested above a LAMP (Linux, Apache, MYSQL, PHP) server will provide everything you need. I use UBUNTU Linux as it provides a simple install/remove facility fot most software and it is easy to create a LAMP server.