first check what el is. just because an attribute is named “id” does not mean it’s a target for document.getElementById().
second, el.style does not modify the attribute itself, it modifies the attribute’s representation in the DOM tree. you’d probably need to use setAttribute().
It appears that the points are relative to the polyline container itself, so when you apply the scale you shrink the container but the points remain the same within the container. Try the following script modification which will show the style before and after the scale change. The scaling is definitely working, but the points remain the same.
<script type="text/javascript">
function s()
{ var el= document.getElementById('pl');
console.log( el.getAttribute('points'));
console.log( el.getAttribute('style'));
el.style.transform="scale(0.5)";
console.log( el.getAttribute('points'));
console.log( el.getAttribute('style'));
}
</script>