Here's the essentials of the MovingPlatform class (I left out ChooseNewPosition since I'm sure you have your own solution for that). The only part of it you really need to have is "public Vector2 MoveDelta => rb.velocity;" as well as the part where you move it using the platform's rigidbody.
Hope this helps and let me know if you have any questions!