How much weight will the platform need to carry? If you're talking about something heavy, you're going to want more than detents to hold it in place. For something heavy, I'd recommend a lockable rail of square tubing, like what they make EZ-Up tent poles with.
https://ezup4less.com/acatalog/Express_Enterprise_Parts.html
If you're willing to put a squeezable handle on the platform, you could also use a rack:
R2020X4, 20PA 1/2"X1/2"X4' Rack, Factory New https://www.amazon.com/dp/B07CG9Z272/ref=cm_sw_r_apan_i_6MEAXFG7HPGPXWSJCXHB?_encoding=UTF8&psc=1 (rack; this one might be overkill at 4ft)
Boston Gear YA12 Spur Gear, Steel, Inch, 20 Pitch, 0.313" Bore, 0.700" OD, 0.500" Face Width, 12 Teeth https://www.amazon.com/dp/B004NYAHSE/ref=cm_sw_r_apan_i_Z504AJYFA3HQ13YESKV4?_encoding=UTF8&psc=1 (pinion)
The pinion gear would roll up and down the rack. You could add a spring-loaded handle to lock an additional pin/brake/partial gear to the platform.
National Hardware N109-212 V1142 Spring Loaded Heavy Duty Sliding Bolt Zinc https://www.amazon.com/dp/B07B4B6339/ref=cm_sw_r_apan_i_HZAGQ3TFKB9G270ZRKYF
With the product in that last link, all you'd actually need is a track with holes large enough for the pin to drop into.