Is it possible to make the local coordinate system the default for the whole map in one of those map libraries?
You surely can. But then the base layer must be in this CRS too, meaning that you wont be able to use OSM from a public source.
If not, should the data be converted into the coordinate system of the map (WGS 84) in the database or a cache or doesn't that matter?
Yes, it matters. If you wish to use OSM then you must use EPSG:3857, and any other layer you intend to overlay must also be available in such CRS. How to make that CRS conversion depends on how you intend to access the data:
Through OGC WMS - this way you can set up a service with the original dataset and instruct the server (e.g. MapServer, Geoserver) to provide it in an alternative CRSs.
Direct from the dataset files - this way it is better to re-project all datasets a priori into EPSG:3857.
I would advise you to go with option 1 and use OSM as a base map. This will possibly achieve the better end user experience.