You can't.
Communication with the Stream Deck is not fully bi-directional. Yes, the KM SD plugin can set a button title, image, or briefly show a tick-mark or an alert, but it can't "press a button" or run an action on the SD.
You can switch Profiles, but only because that's done through the SD app on your computer. You could do similar by opening the "Configure Stream Deck" window, selecting the right device and profile, clicking a page number in the list below the keys, and closing the window -- but that seems a bit clunky...
But...
Elgato have recently(?) added MCP support and
AI tools can now connect to Stream Deck and trigger your actions...
...and, as I understand it, page navigation is actions.
A downside is that, according to their MCP page, only the dedicated "MCP Actions" profile is available, so you'd have to put all the pages you want to automate through into that profile.