Ticket the scooter company for improperly parked/docked scooters in geofenced areas where parking/docking is available. The scooter companies will update their software & hardware to bill the rider if they leave their scooter outside of a permitted dock. The riders will be incentivized to park/dock the scooters.
The problem will fix itself, without throwing the baby out with the bathwater.
I don't ride scooters, and I don't like stepping over them when people dump them/knock them down, but I love that they exist, and we need more, not less infrastructure to support non-automobile transport. In this case, the infrastructure consists of installing bike/scooter racks. It's not expensive.
Copenhagen already has bike racks on most streets in the centre. The blue Cs and blue dots are some of them, many more aren't marked:
https://www.openstreetmap.org/#map=16/55.6782/12.5735&layers...
I strongly suspect the companies encouraged their staff to put them in slightly annoying places as advertisements -- if you trip over a scooter, you've noticed the brand!
Copenhagen ended up banning them from the city centre.
https://www.eltis.org/in-brief/news/e-scooters-allowed-back-...
(Copenhagen already has pedestrian and bicycle space, so the scooter companies weren't bringing anything there -- only taking that space away. Many other cities are so bad, the scooter companies are probably still a positive influence even with the terrible riders.)