"this page is just the info you need" is data in the database which relates to id=123456 but I am guessing the only data available in htaccess would be whats in the url. So the only dynamic data is the id in this case.
Wordpress does it. It basically sends all requests to a script that reads the database, checks URLs and then either renders the page or sends back 301 redirect response or sends back 404 Not Found response, whatever is appropriate.
So all that .htaccess does is pretty much forwarding requests to a script in cases where the request is not an existing server file or existing directory.
I have also worked on a few applications that have friendly URLs done in a similar way (without ID in the URL).
By the way, if you are doing these friendly URLs, I would drop .php extension. This then makes URL technology agnostic.