How to implement input from device accelerometer and gyroscope?

Aside from the device orientation web browser API’s , that is correct; the DeviceOrientationCamera has a Class that wraps the browser events, but that is specific logic related to camera management.

There is active work going on in this area of Babylon.js as well as similarly-framed feature requests that echo your sentiments

HTH