Why don't you just do everything on the ESP? There's no reason to use the AT interface and add a second microcontroller.
Having said that, I wonder how information gets into your MCU in a way that doesn't make it accessible to an adversary.
For going into command mode Use a TTL to USB converter.
To connect this converter module to the Bluetooth module, just follow the following wiring
***** VCC Bluetooth to VCC Converter
*** GND Bluetooth to GND Converter
*** TX Bluetooth to RX Converter
*** Bluetooth RX to TX Converter
that is all!**
To switch to command mode, disconnect ...
I got there in the end with this. Bear in mind the following conditions when trying to send AT commands to the HC-05:
The default baud rate on my module was 9600, not 38400 as described in certain places
If you make PIO11 (key) high (3.3v) while the module is on, it will enter AT command mode but will retain the default baud rate
If you power the module up ...