Train with two Powered Up hubs
Yes, what you require is perfectly possible to implement in the Powered Up app on nearly any recent smart device.
You do need to program a bit, there's a graphical programming interface which you can get to after tapping the &quot;Create&quot; button.
Since you mention that you're experienced with actual programming languages like Python and Java, you should have no difficulty figuring out what the code blocs do.
You'll have the option to either work with sliders that will be present on some makeshift GUI on your smart device to control the speed, or you can chose to connect a remote as a third device (the other two devices being the hubs) and work with the input from the remote...
Addition: I've found the following example program on reddit:

It's a successful attempt to control the train with the remote just like when the remote would be connected directly... it maintains a variable with the speed of a the train, which can be increased or decreased with the + and - buttons on the train remote, and then the speed is set to the motor. The only change you would need to make is setting the negative of that speed on the second train motor which will be connected to the second hub.
That hub will be the third device connected, which is important for the port selection in the code blocks...