In principle, you can do whatever you want in terms of signalling, API, session management etc. in the plugin, but the media-related stuff depends on what the plugin provides natively: you don't handle media in JavaScript, you tell the native code what to do. So you can definitely write your own SFU (videoroom.lua is a basic example of that for Lua) since the native code allows you to hook sources to destinations easily, but MCU requires mixing, and this plugin doesn't provide mixing features: you'd have to add the C code for that yourself.
L.