Using CGI for system configuration

I’m planning to use BBB as a motion controller. There are some parameters which have to be changed by the user in runtime and no need to create a fancy frontend so I want to a simple webpage which can be even accessible with smartphone. I got some ideas but I wanted to get another ideas.

For changing variables:
-My opinion writing a C++ code is enough for this task as it works with CGI. (I thought C++ for the reason there will be no overhead of interpreter.)
-My motion control algorithm works as a service which written in C++.
-A frontend c++ binary works with CGI changes some configuration file and restarts service(s).

I did similar things with php and C binaries. (call the C binaries from php)
I can start &stop experiments, configure experiments, create plots
(with ImageMagick or with libpng, the latter is much faster...),
download measurement files, shutdown, change IP, etc... In other
words, you can do almost everything with your web-interface.
The main problem are the user rights, they have to be carefully
set.... In my case, the measurement file is created by a cronjob, but
the Webserver must be able to manipulate it.

I agree, CGI might be the better way to go. I even thought of making
at some point a CGI rewrite.