I ran a Megasquirt on my XR2 many years ago, fuel control only. Taking control of the ignition at that time was a bigger deal.
Fuel only was pretty easy, but the benefits of electronic ignition are huge. I kept the stock ignition because of the OEM knock controller but there are options for that now.
The Miata CAS will work. I think it lacks a bit of resolution though, but should be fine. The Ford EDIS-4 system was popular at the time, simple wiring with its own control module, but required a crank trigger. There are probably other options now, I have not been keeping an eye on that scene for some time.
Speed density seems to be the way to go, perhaps there are benefits to using a MAF system, but definitely get rid of the stock VAF. You'll need to use your ECU to trigger the fuel pump then.
Another option that was popular for a time at least for the BP guys was a Mitsubishi EVO ecu, it was hacked completely and was configurable to run other engines. Someone was making a kit + drop in BP wire harness, though I don't think they are making them anymore. This could be adapter to run the B6D/T no problems
There's also a guy from the Festiva forum that started a new grassroots DIY ECU movement, rusEFI
https://rusefi.com/Seems to have gained quite a bit of traction, it's got some good features, and priced below that of Megasquirt I believe.