How to align player along curved surfaces, and adapt gravity based on that?

Godot Version

Godot 4.2

Question

How to align player along curved surfaces, and adapt gravity based on that ?

I want to reproduce a wall behaviour similar to the one found in the video below, in Godot 4.2. My issue though is that all the documentation i can find is for Godot 3.x, so there is a lot of conflicts. I’m also using a hierarchical state machine
This is the video that illustrate the behaviour i want to achieve in my platformer :
Link to video

Thanks !