As for e-bikes, my usual observation when one comes in with an intermittent error is "We've managed to make bicycles as reliable as computers. What an incredible accomplishment for our species."
We only work on the electric drivetrain on Trek bikes (and others that use Bosch). I can vouch for the fact that as of October 2024, the electric drivetrain stuff can be handled from the on-bike computer and an app isn't necessary for basic functionality. I'm sure you get some more features with the app, but you don't need it to just go for a ride.
Batteries come with some wrinkles. Many manufacturers (not just Trek) want to make them easily removable so you can take them with you to charge and prevent them from getting stolen. They also want them to integrate nicely with the frame visually. The result is frequently some amount of compromise in the proprietary direction.
That said, Bosch appears to make some standard-ish batteries that are used in less-integrated installations across bike manufacturers.