Remote control of Android from PC or another Android device
Yes this did used to be possible, it is still possible but it requires more on the target device these days.

On below Android 5.0 , it was easy to do what you're saying, however it started to become apparent very quickly that the majority of people did not use this for its intended purpose...

For example, you could previously check on elderly people's movement's around the house to help ensure they're safe... however people would use these features on their partner's to "see" if they're Cheating for example..

It was seen as a serious violation of peoples privacy, and therefore certain measures have been implemented since above Android 4.4.

The new measures are, 
• 1 single SMS application is aloud to recognise OutGoing SMS, Incoming SMS is not restricted because of SMS Verification or ( 2FA ) ..

• Real Time Permission Acceptance

• OnBoot restrictions on some devices

You did used to have Full Control over Android 4.4+ .. You could even have the application hidden with another name and icon, and Only launchable by dialing a phone number.

.
Yes you can still bypass everything, but it is very annoying to do..
 .
You would need a permission acceptance screen to accept All permissions on the first start... An OnBoot listener to start the service On Boot... and also you would need to be running as a Device Administrator to Toggle things like Airplane Mode..

The wide selections make the application very obvious to the user, so as long as you are the user on both device's, you should not have any problems.

Using applications like
• SMS Forwarder
• SMS Controller 
• Tasker
and others..

I have attempted building this myself, however it has very limited control.

You can also use this Pre-Built SMS Control App..

It is released under MIT License, so you could modify it to do what you want.

SMS Control - F-droid.org