I don’t have any real recommendations. Modifying the physics behavior via scripting to be able to access box2d’s filtering will require a fair amount of digging and probably be complex to do if at all possible.
Skipping the behavior and just using a js physics library directly is another option but it’s a lot of busywork to set things up. Basically it requires making a physics version of objects and synchronizing them every tick. Just a lot of busywork mostly.
Another option is making event based physics which would give you the most control but would take more knowledge, although you can find lots of not specific to construct tutorials of how to make a physics engine online.
Simplest solution would be to just utilize the physics behaviors disable collision with other objects feature. Even if that’s a bit tedious. A more complex option would be to have the ramp be just a visual, but you’d have it duplicated off screen somewhere with collisions enabled. Then you’d have a physics version of the ball and a visual version. When hitting the ramp the physics version would be teleported to the off screen ramp while the visual version stays on screen. Or something like that.