It should be possible to add size varying styling for points and lines. The issue here is that the SLD bodies required to do this are very large, and GeoServer might reject them. It might be possible to look at using GeoSever’s REST API for styling instead of using XML.